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 Jan 10, 2024
1 parent bbe17cc commit 290644c
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 @@ -218,6 +218,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 @@ -327,6 +327,7 @@ private static void SetAllFeatureFlags(ChocolateyConfiguration config, ConfigFil
config.Features.ShowDownloadProgress = SetFeatureFlag(ApplicationParameters.Features.ShowDownloadProgress, configFileSettings, defaultEnabled: true, description: "Show Download Progress - Show download progress percentages in the CLI.");
config.Features.StopOnFirstPackageFailure = SetFeatureFlag(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.");
config.Features.UseRememberedArgumentsForUpgrades = SetFeatureFlag(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. This is considered in preview and will be flipped to on by default in a future release.");
config.Features.UseRememberedArgumentsForUninstalls = SetFeatureFlag(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 2.4.0+. This is considered in preview and will be flipped to on by default in a future release.");
config.Features.IgnoreUnfoundPackagesOnUpgradeOutdated = SetFeatureFlag(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.");
config.Features.SkipPackageUpgradesWhenNotInstalled = SetFeatureFlag(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.");
config.Features.RemovePackageInformationOnUninstall = SetFeatureFlag(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? ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,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 290644c

Please sign in to comment.