-
Notifications
You must be signed in to change notification settings - Fork 906
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
Chocolatey CLI does not use the cachelocation
which is configured within the chocolatey.config file
#3225
Closed
4 tasks done
Comments
This was referenced Jun 23, 2023
10 tasks
corbob
pushed a commit
to gep13/choco
that referenced
this issue
Jun 23, 2023
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.
corbob
added a commit
to gep13/choco
that referenced
this issue
Jun 23, 2023
Make use of the test-environment package that already exists to get the environment variables set by Chocolatey and ensure that key variables are set as they should be.
corbob
added a commit
to gep13/choco
that referenced
this issue
Jun 23, 2023
Make use of the test-environment package that already exists to get the environment variables set by Chocolatey and ensure that key variables are set as they should be.
corbob
added a commit
to gep13/choco
that referenced
this issue
Jun 23, 2023
Make use of the test-environment package that already exists to get the environment variables set by Chocolatey and ensure that key variables are set as they should be.
corbob
added a commit
to gep13/choco
that referenced
this issue
Jun 25, 2023
Make use of the test-environment package that already exists to get the environment variables set by Chocolatey and ensure that key variables are set as they should be.
gep13
changed the title
Chocolatey CLI does not use the cachelocation which is configured within the chocolatey.config file
Chocolatey CLI does not use the Jun 27, 2023
cachelocation
which is configured within the chocolatey.config file
gep13
added a commit
that referenced
this issue
Jun 29, 2023
* release/2.1.0: (52 commits) (maint) If statement formatting change (#3224) Add Assembly Loaded configuration option (maint) Resave without BOM (#3224) Update version check tests (#3174) Store non-normalized package version (maint) Add required whitespace (#3225) Add Pester Tests to ensure environment (#3201 #3225) Re-instate setting of config values (maint) Remove env variable for release version (maint) Fix encoding of file (#3194) Add tab completion for cache command (#2854) Re-save file with UTF-8 with BOM (#3218) Update Tab Expansion to use Test-Path (#3218) Remove try catch block for tab completion (build) Use latest Chocolatey.Cake.Recipe package (#2854) Do Write-Error instead of Write-Warning (#2854) Pester tests to Get-ChocolateyConfigValue (maint) Resave Get-ChocolateyConfigValue as CRLF (#2854) Add helper to read config values (#3214) Add Pester tests to ensure cache cleared ...
🎉 This issue has been resolved in version 2.1.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
gep13
added a commit
that referenced
this issue
Jun 29, 2023
* master: (maint) If statement formatting change (#3224) Add Assembly Loaded configuration option (maint) Resave without BOM (#3224) Update version check tests (#3174) Store non-normalized package version (maint) Add required whitespace (#3225) Add Pester Tests to ensure environment (#3201 #3225) Re-instate setting of config values (maint) Remove env variable for release version (maint) Fix encoding of file (#3194) Add tab completion for cache command (#2854) Re-save file with UTF-8 with BOM (#3218) Update Tab Expansion to use Test-Path (#3218) Remove try catch block for tab completion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
What You Are Seeing?
When attempting to set the cachelocation to be used via Chocolatey CLI, everything works fine when you pass this information via the command line option
--cachelocation=<some path>
. However, when the cachelocation is set, and persisted, within the chocolatey.config file (via thechoco config
command), the cachelocation is not correctly picked up, and instead the default location within the %TEMP% folder is used.Chocolatey CLI works be setting the TEMP environment variable for the current process execution to be the cachelocation value, as a result, downloading of binaries, nupkg's, etc, should use this value when set.
What is Expected?
Regardless of what method is used to set the cachelocation, i.e. either via the chocolatey.config file, or via command line option, the cachelocation should be correctly interpreted and used when installing packages.
How Did You Get This To Happen?
These steps are working on the assumption that setting the cache-location value to "something" then results in the TEMP environment variable being set with this value, which is then used within the innosetup package to determine where the log file is created. This previously would not have worked and the log file would never have been created in the choco-cache folder.
System Details
Installed Packages
Output Log
Additional Context
This is related to this issue as both of them have the same root cause.
The text was updated successfully, but these errors were encountered: