Skip to content

Commit

Permalink
(maint) move magic string to constants
Browse files Browse the repository at this point in the history
Package name of "all" is a magic string and needs to be in
ApplicationParameters.
  • Loading branch information
ferventcoder committed May 15, 2015
1 parent d028324 commit 6f711ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/chocolatey/infrastructure.app/ApplicationParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static class ApplicationParameters
public static readonly string ChocolateyCommunityFeedPushSource = "https://chocolatey.org/";
public static readonly string UserAgent = "Chocolatey Command Line";
public static readonly string RegistryValueInstallLocation = "InstallLocation";
public static readonly string AllPackages = "all";

/// <summary>
/// Default is 45 minutes
Expand Down
2 changes: 1 addition & 1 deletion src/chocolatey/infrastructure.app/services/NugetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ public void remove_installation_files(IPackage removedPackage, ChocolateyPackage

private void set_package_names_if_all_is_specified(ChocolateyConfiguration config, Action customAction)
{
if (config.PackageNames.is_equal_to("all"))
if (config.PackageNames.is_equal_to(ApplicationParameters.AllPackages))
{
config.ListCommand.LocalOnly = true;
var sources = config.Sources;
Expand Down

0 comments on commit 6f711ad

Please sign in to comment.