From 247fdf1dd6b2982e4beb92af0ebc8cd04c6ee56c Mon Sep 17 00:00:00 2001 From: TheCakeIsNaOH Date: Wed, 19 Jan 2022 17:13:40 -0600 Subject: [PATCH] (#23) Rename function This renames the set_package_names_if_all_is_specified function to set_local_package_names_if_all_is_specified. This is to increase clarity for when the all keyword is implemented, and a function will be to be added that sets packages names from a remote source. --- .../infrastructure.app/services/NugetService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chocolatey/infrastructure.app/services/NugetService.cs b/src/chocolatey/infrastructure.app/services/NugetService.cs index d8db70c50..ba71753b0 100644 --- a/src/chocolatey/infrastructure.app/services/NugetService.cs +++ b/src/chocolatey/infrastructure.app/services/NugetService.cs @@ -1021,7 +1021,7 @@ public virtual ConcurrentDictionary Upgrade(ChocolateyCon var projectContext = new ChocolateyNuGetProjectContext(config, _nugetLogger); var configIgnoreDependencies = config.IgnoreDependencies; - var allLocalPackages = SetPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }).ToList(); + var allLocalPackages = SetLocalPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }).ToList(); config.IgnoreDependencies = configIgnoreDependencies; var localPackageListValid = true; @@ -1679,7 +1679,7 @@ public virtual ConcurrentDictionary GetOutdated(Chocolate var outdatedPackages = new ConcurrentDictionary(); - var allPackages = SetPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }); + var allPackages = SetLocalPackageNamesIfAllSpecified(config, () => { config.IgnoreDependencies = true; }); var packageNames = config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).OrEmpty().ToList(); config.CreateBackup(); @@ -2271,7 +2271,7 @@ public virtual ConcurrentDictionary Uninstall(ChocolateyC } } - SetPackageNamesIfAllSpecified(config, () => + SetLocalPackageNamesIfAllSpecified(config, () => { // force remove the item, ignore the dependencies // as those are going to be picked up anyway @@ -2862,7 +2862,7 @@ public IEnumerable GetInstalledPackages(ChocolateyConfiguration c return installedPackages; } - private IEnumerable SetPackageNamesIfAllSpecified(ChocolateyConfiguration config, Action customAction) + private IEnumerable SetLocalPackageNamesIfAllSpecified(ChocolateyConfiguration config, Action customAction) { var allPackages = GetInstalledPackages(config); if (config.PackageNames.IsEqualTo(ApplicationParameters.AllPackages))