Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#2630) Re-instate setting of config properties
Previously, in this commit: chocolatey@da19356#diff-cb6a0471e41268b22a928bd57a59d51b70b7024e9beb30e89a330e193a089eba The usage of the top level CacheLocation and CommandExecutionTimeoutSeconds values had been removed, since these top level properties within the chocolatey.config had been replaced with values contained within the config section of the chocolatey.config file. However, the changes in that commit were too aggressive, and removed the call to the set_config_item (which has subsequently been renamed to SetConfigItem). The method call does the work of taking any value that is defined in the chocolatey.config for a given property name, and adding it to the ChocolateyConfiguration instance. When this method call was removed, it stopped setting the property value on the instance, and as a result, values that had been configured in the chocolatey.config file were ignored. They were still in play when the configuration was passed in via a command line option, but not when defining them in the chocolatey.config file. The removal of this call to the set_config_item method also explains why it was necessary to apply this bug fix in Chocolatey GUI: chocolatey/ChocolateyGUI#1003 The method call also had the effect of setting the description on the configuration value, which would have meant that Chocolatey GUI wouldn't have thrown a null reference exception. The change in Chocolatey GUI is still valid though, as there are times when a config value can have a missing description, so it makes sense to leave that fix in place.
- Loading branch information