Skip to content

Commit 102d90a

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 f3ca683 commit 102d90a

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
@@ -197,6 +197,7 @@ public static class Features
197197
public static readonly string ShowDownloadProgress = "showDownloadProgress";
198198
public static readonly string StopOnFirstPackageFailure = "stopOnFirstPackageFailure";
199199
public static readonly string UseRememberedArgumentsForUpgrades = "useRememberedArgumentsForUpgrades";
200+
public static readonly string UseRememberedArgumentsForUninstalls = "useRememberedArgumentsForUninstalls";
200201
public static readonly string IgnoreUnfoundPackagesOnUpgradeOutdated = "ignoreUnfoundPackagesOnUpgradeOutdated";
201202
public static readonly string SkipPackageUpgradesWhenNotInstalled = "skipPackageUpgradesWhenNotInstalled";
202203
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
@@ -302,6 +302,7 @@ private static void set_feature_flags(ChocolateyConfiguration config, ConfigFile
302302
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+.");
303303
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+.");
304304
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.");
305+
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.1.0+. This is considered in preview for 1.1.0 and will be flipped to on by default in a future release.");
305306
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+.");
306307
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+.");
307308
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
@@ -403,6 +403,7 @@ public sealed class FeaturesConfiguration
403403
public bool ShowDownloadProgress { get; set; }
404404
public bool StopOnFirstPackageFailure { get; set; }
405405
public bool UseRememberedArgumentsForUpgrades { get; set; }
406+
public bool UseRememberedArgumentsForUninstalls { get; set; }
406407
public bool IgnoreUnfoundPackagesOnUpgradeOutdated { get; set; }
407408
public bool SkipPackageUpgradesWhenNotInstalled { get; set; }
408409
public bool RemovePackageInformationOnUninstall { get; set; }

0 commit comments

Comments
 (0)