-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#2503) Add ability to export saved arguments #2506
base: develop
Are you sure you want to change the base?
(#2503) Add ability to export saved arguments #2506
Commits on Apr 28, 2024
-
(chocolatey#508) Make package id comparisons case insensitive
This helps ensure that package IDs are handled in a case insensitive manner.
Configuration menu - View commit details
-
Copy full SHA for edd1f23 - Browse repository at this point
Copy the full SHA edd1f23View commit details -
(chocolatey#2761) Allow overriding remembered arguments
This allows overriding of remembered package parameters, install arguments, cache location and execution timeout during upgrade. So a user can pass in different package parameters or arguments without having to completely reinstall the package or turn off remembered arguments. Switch arguments cannot be checked, because the lack of a switch normally would mean that they are just relying on the remembered args to remember it, so there is no way to determine if an override of the remembered args is appropriate.
Configuration menu - View commit details
-
Copy full SHA for 2c37c9a - Browse repository at this point
Copy the full SHA 2c37c9aView commit details -
(chocolatey#2886) Switch remembered args to only change local configu…
…ration This adds a new method, GetPackageConfigFromRememberedArguments which is similar to SetConfigFromRememberedArguments, but operates using a different method. First, a OptionSet is set up, so only the config that is passed in is modified, instead of the config that the global options parser was set with with. Second, it returns the modified configuration instead of the original configuration, because it is the local configuration being modified. Third, it has a more general name and changes log messages to be more general, so it later can more easily be reused for uninstall and export. This change fixes remembered arguments when Chocolatey is used as a library, like in ChocolateyGUI, where the config that is passed to the install_run method is not necessarily the same config object that was used to set up the global argument parser. The downside of using a new commandline parser is that it opens up the possibility of drift between the upgrade/global arguments and this added parser. However, this is not an issue because the format of the saved arguments is known, and any added arguments there would not work without being added here as well, which would be picked up during development.
Configuration menu - View commit details
-
Copy full SHA for 85ab916 - Browse repository at this point
Copy the full SHA 85ab916View commit details -
(chocolatey#2503) Export via serialization of class
Instead of exporting via building an xml document manually, this creates a PackagesConfigFilePackageSetting and serializes that to create the xml document that is saved. This allows for usage of the same class as is used to read in packages.config files to export those files. The reason the various "Specified" members are added to the PackagesConfigFilePackageSetting class is so if an element is not set during export, it will not show up at all in the resulting serialized packages.config file.
Configuration menu - View commit details
-
Copy full SHA for 0ebf572 - Browse repository at this point
Copy the full SHA 0ebf572View commit details -
(chocolatey#2503) Add ability to export remembered arguments
This adds the --include-remembered-arguments option which is used to export any remembered arguments. It reuses the GetPackageConfigFromRememberedArguments method in the NugetService to read and parse the remembered arguments.
Configuration menu - View commit details
-
Copy full SHA for db7ea32 - Browse repository at this point
Copy the full SHA db7ea32View commit details