Skip to content

Commit 82e1052

Browse files
committed
(#1479) Add UseRememberedArgumentsForUninstalls feature
Similar to the UseRememberedArgumentsForUpgrade feature, this will be used to toggle if the remembered arguments are used during uninstall.
1 parent e31fe33 commit 82e1052

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/chocolatey/infrastructure.app/ApplicationParameters.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ public static class Features
200200
public static readonly string ShowDownloadProgress = "showDownloadProgress";
201201
public static readonly string StopOnFirstPackageFailure = "stopOnFirstPackageFailure";
202202
public static readonly string UseRememberedArgumentsForUpgrades = "useRememberedArgumentsForUpgrades";
203+
public static readonly string UseRememberedArgumentsForUninstalls = "useRememberedArgumentsForUninstalls";
203204
public static readonly string IgnoreUnfoundPackagesOnUpgradeOutdated = "ignoreUnfoundPackagesOnUpgradeOutdated";
204205
public static readonly string SkipPackageUpgradesWhenNotInstalled = "skipPackageUpgradesWhenNotInstalled";
205206
public static readonly string RemovePackageInformationOnUninstall = "removePackageInformationOnUninstall";

src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ private static void set_feature_flags(ChocolateyConfiguration config, ConfigFile
311311
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+.");
312312
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+.");
313313
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.");
314+
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.");
314315
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+.");
315316
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+.");
316317
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+.");

src/chocolatey/infrastructure.app/configuration/ChocolateyConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ public sealed class FeaturesConfiguration
508508
public bool ShowDownloadProgress { get; set; }
509509
public bool StopOnFirstPackageFailure { get; set; }
510510
public bool UseRememberedArgumentsForUpgrades { get; set; }
511+
public bool UseRememberedArgumentsForUninstalls { get; set; }
511512
public bool IgnoreUnfoundPackagesOnUpgradeOutdated { get; set; }
512513
public bool SkipPackageUpgradesWhenNotInstalled { get; set; }
513514
public bool RemovePackageInformationOnUninstall { get; set; }

0 commit comments

Comments
 (0)