-
Notifications
You must be signed in to change notification settings - Fork 905
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
(GH-1059) Fix for setting global variables #1150
Conversation
Thanks! I will review this and look to get it fixed for 0.10.4. |
In the interim, can you review the CONTRIBUTING document for how the git commit should be done and make those fixes? Much appreciated. |
Reworked my issue according to |
The actual git commit itself will need amended - note contributing does mention how to do this. Also, we can be sticklers on that summary - "(GH-###) summary" is how we want to see it. So parentheses, then a space, then the summary. And try to keep that to about 50ish characters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to review this a bit more but it looks pretty good to me!
commandExecutionTimeoutSeconds was defined twice in the Chocolatey configuration. With this pull request, only the primary key is used. This fixes the incorrect behaviour that choco exhibited when changing this value through `choco config`. Closes chocolatey#1059 chocolatey#973 .
665d5f4
to
b37f1fc
Compare
Fixed it for you :). At least I hope I got it right now. Thanks for the feedback :) |
I've created a workaround for setting the variable through Powershell's XML interface: $path = "C:\ProgramData\chocolatey\config\chocolatey.config"
$xml = [xml](Get-Content $path)
$xml.chocolatey.commandExecutionTimeoutSeconds = "2700"
$xml.SelectSingleNode('//chocolatey/config/add[@key="commandExecutionTimeoutSeconds"]').value = "2700"
$xml.SelectSingleNode('//chocolatey/config/add[@key="webRequestTimeoutSeconds"]').value = "30"
$xml.Save($path) This is an easy way to modify the config file within a scripting environment. |
@alex3305 this looks to have went to the deprecated commandExecutionTimeoutSettings - We haven't used those in a long time, the idea was to upgrade those to the new locations. I think it's probably okay to remove those now though. |
@alex3305 moved forward on this in a different way. I really appreciate your contributions, hopefully next time we can get a deeper review a little sooner. |
commandExecutionTimeoutSeconds was defined twice in the Chocolatey
configuration. With this pull request, only the primary key is used. This
fixes the incorrect behaviour that choco exhibited when changing this
value through
choco config
.Closes #1059 #973.
For testing use the following commands:
In the old version, the default value of 2700 was displayed. In this change
the value will be set at the given value.