Skip to content

Commit

Permalink
(chocolatey#1479) Add UseRememberedArgumentsForUninstalls feature
Browse files Browse the repository at this point in the history
Similar to the UseRememberedArgumentsForUpgrade feature, this will be
used to toggle if the remembered arguments are used during uninstall.
  • Loading branch information
TheCakeIsNaOH committed Sep 25, 2022
1 parent e31fe33 commit 82e1052
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/chocolatey/infrastructure.app/ApplicationParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public static class Features
public static readonly string ShowDownloadProgress = "showDownloadProgress";
public static readonly string StopOnFirstPackageFailure = "stopOnFirstPackageFailure";
public static readonly string UseRememberedArgumentsForUpgrades = "useRememberedArgumentsForUpgrades";
public static readonly string UseRememberedArgumentsForUninstalls = "useRememberedArgumentsForUninstalls";
public static readonly string IgnoreUnfoundPackagesOnUpgradeOutdated = "ignoreUnfoundPackagesOnUpgradeOutdated";
public static readonly string SkipPackageUpgradesWhenNotInstalled = "skipPackageUpgradesWhenNotInstalled";
public static readonly string RemovePackageInformationOnUninstall = "removePackageInformationOnUninstall";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ private static void set_feature_flags(ChocolateyConfiguration config, ConfigFile
config.Features.ShowDownloadProgress = set_feature_flag(ApplicationParameters.Features.ShowDownloadProgress, configFileSettings, defaultEnabled: true, description: "Show Download Progress - Show download progress percentages in the CLI. Available in 0.10.4+.");
config.Features.StopOnFirstPackageFailure = set_feature_flag(ApplicationParameters.Features.StopOnFirstPackageFailure, configFileSettings, defaultEnabled: false, description: "Stop On First Package Failure - Stop running install, upgrade or uninstall on first package failure instead of continuing with others. As this will affect upgrade all, it is normally recommended to leave this off. Available in 0.10.4+.");
config.Features.UseRememberedArgumentsForUpgrades = set_feature_flag(ApplicationParameters.Features.UseRememberedArgumentsForUpgrades, configFileSettings, defaultEnabled: false, description: "Use Remembered Arguments For Upgrades - When running upgrades, use arguments for upgrade that were used for installation ('remembered'). This is helpful when running upgrade for all packages. Available in 0.10.4+. This is considered in preview for 0.10.4 and will be flipped to on by default in a future release.");
config.Features.UseRememberedArgumentsForUninstalls = set_feature_flag(ApplicationParameters.Features.UseRememberedArgumentsForUninstalls, configFileSettings, defaultEnabled: false, description: "Use Remembered Arguments For Uninstalls - When running uninstalls, use arguments for uninstall that were used for installation or upgrade ('remembered'). Does not include --install-args. Available in 1.3.0+. This is considered in preview for 1.3.0 and will be flipped to on by default in a future release.");
config.Features.IgnoreUnfoundPackagesOnUpgradeOutdated = set_feature_flag(ApplicationParameters.Features.IgnoreUnfoundPackagesOnUpgradeOutdated, configFileSettings, defaultEnabled: false, description: "Ignore Unfound Packages On Upgrade Outdated - When checking outdated or upgrades, if a package is not found against sources specified, don't report the package at all. Available in 0.10.9+.");
config.Features.SkipPackageUpgradesWhenNotInstalled = set_feature_flag(ApplicationParameters.Features.SkipPackageUpgradesWhenNotInstalled, configFileSettings, defaultEnabled: false, description: "Skip Packages Not Installed During Upgrade - if a package is not installed, do not install it during the upgrade process. Available in 0.10.12+.");
config.Features.RemovePackageInformationOnUninstall = set_feature_flag(ApplicationParameters.Features.RemovePackageInformationOnUninstall, configFileSettings, defaultEnabled: false, description: "Remove Stored Package Information On Uninstall - When a package is uninstalled, should the stored package information also be removed? Available in 0.10.9+.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ public sealed class FeaturesConfiguration
public bool ShowDownloadProgress { get; set; }
public bool StopOnFirstPackageFailure { get; set; }
public bool UseRememberedArgumentsForUpgrades { get; set; }
public bool UseRememberedArgumentsForUninstalls { get; set; }
public bool IgnoreUnfoundPackagesOnUpgradeOutdated { get; set; }
public bool SkipPackageUpgradesWhenNotInstalled { get; set; }
public bool RemovePackageInformationOnUninstall { get; set; }
Expand Down

0 comments on commit 82e1052

Please sign in to comment.