-
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
choco.config Edits Do Not Persist for Some Configurations #973
Comments
Just out of curiosity, did you review the help menu at all for config?
|
Long story short, when setting config, you need to pass the commands in appropriately, which is
The name of a configuration value never starts with HTH. |
More information - you are setting an option, which only applies during that run. |
I am stuck at the same issue, executing the following commands, will yield the default value: PS> choco config set commandExecutionTimeoutSeconds 7200
PS> choco config get commandExecutionTimeoutSeconds
Chocolatey v0.10.3
2700 |
@alex3305 that was a pretty obtuse bug, but you found it! |
We will change this to a duplicate of #1059 |
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 .
Just a note that there is a setting that is |
See #1059 (comment) for why and the workaround. |
This is with the latest version of chocolatey (0.10.1)
What You Are Seeing?
I did not test them all but there's one setting and one feature that automatically get overwritten. These are "commandExecutionTimeoutSeconds" and "allowEmptyChecksumsSecure".
What is Expected?
I'm expecting that the values I set persist. Sometimes the execution timeout is too low and I need it to be higher (2 hours/7200 seconds). I don't want to automatically allow files with empty checksum so I set it to false.
How Did You Get This To Happen? (Steps to Reproduce)
So I tried two ways for each, by command and by GUI.
"commandExecutionTimeoutSeconds"
By command for :
By GUI:
Opened choco.config with Notepad++ as Admin and changed the value and saved.
Differences:
<add key="commandExecutionTimeoutSeconds" value="2700" description="Default timeout for command execution." />
<add key="commandExecutionTimeoutSeconds" value="7200" description="Default timeout for command execution." />
Workaround:
Use any text editor as Admin.
I noticed to workaround it you have to change this instead
<commandExecutionTimeoutSeconds>
0</commandExecutionTimeoutSeconds>
<commandExecutionTimeoutSeconds>
value</commandExecutionTimeoutSeconds>
I also noticed that the value entered above becomes like an "upperbound" for the execution timeout, if it's zero it won't change no matter what. What I mean is that if you but anything higher in the config section but can be lower, it will be the the value above the config section. This might be a bug.
Changing it by command will still not work since it's not "configurable" by command (from my observations).
"allowEmptyChecksumsSecure"
Changing by command works
By GUI:
Differences:
<feature name="allowEmptyChecksums" enabled="**true**" setExplicitly="false" description="Allow packages to have empty/missing checksums for downloaded resources from non-secure locations (HTTP, FTP). Enabling is not recommended if using sources that download resources from the internet. Available in 0.10.0+." />
<feature name="allowEmptyChecksums" enabled="**false**" setExplicitly="false" description="Allow packages to have empty/missing checksums for downloaded resources from non-secure locations (HTTP, FTP). Enabling is not recommended if using sources that download resources from the internet. Available in 0.10.0+." />
`
Log
I'm almost certain this is a bug because when using -dv (--debug --verbose), it acknowledges the execution timeout value to be set. Refer to Workaround to see how I got commandExecutionTimeoutSeconds to be 3600. It will say 2700 if the value in "Workaround" is 0. Putting important stuff in bold.
command: choco config --execution-timeout=3000 --verbose --debug
2016-09-21 13:37:28,122 [DEBUG] - Configured chocolatey.infrastructure.logging.log4net.config.xml from assembly choco, Version=0.10.1.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb
2016-09-21 13:37:28,122 [DEBUG] - Configured chocolatey.infrastructure.logging.log4net.config.xml from assembly choco, Version=0.10.1.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb
2016-09-21 13:37:28,146 [DEBUG] - XmlConfiguration is now operational
2016-09-21 13:37:28,421 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\config\chocolatey.config.update".
2016-09-21 13:37:28,427 [INFO ] - ============================================================
2016-09-21 13:37:28,431 [INFO ] - Chocolatey v0.10.1
2016-09-21 13:37:28,443 [DEBUG] - Chocolatey is running on Windows v 10.0.14393.0
2016-09-21 13:37:28,445 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2016-09-21 13:37:28,447 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2016-09-21 13:37:28,458 [DEBUG] - Command line not shown - sensitive arguments may have been passed.
2016-09-21 13:37:28,512 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2016-09-21 13:37:28,521 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2016-09-21 13:37:28,531 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2016-09-21 13:37:28,594 [DEBUG] - The source '' evaluated to a 'normal' source type
2016-09-21 13:37:28,596 [DEBUG] -
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
2016-09-21 13:37:28,606 [DEBUG] - Configuration: CommandName='config'|
CacheLocation='C:\Users\Samer\AppData\Local\Temp\chocolatey'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='3000'|WebRequestTimeoutSeconds='60'|
SourceType='normal'|Debug='True'|Verbose='True'|Force='False'|
Noop='False'|HelpRequested='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|
AcceptLicense='False'|
AllowUnofficialBuild='False'|AllVersions='False'|
SkipPackageInstallProvider='False'|Prerelease='False'|ForceX86='False'|
OverrideArguments='False'|NotSilent='False'|
ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.14393.0'|
Information.PlatformName='Windows'|
Information.ChocolateyVersion='0.10.1.0'|
Information.ChocolateyProductVersion='0.10.1'|
Information.FullName='choco, Version=0.10.1.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64Bit='True'|Information.IsInteractive='True'|
Information.IsUserAdministrator='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Features.AutoUninstaller='True'|
Features.ChecksumFiles='True'|Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='False'|
Features.FailOnAutoUninstaller='True'|
Features.FailOnStandardError='True'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='True'|Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
ListCommand.LocalOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|FeatureCommand.Command='unknown'|
ConfigCommand.Command='list'|PinCommand.Command='unknown'|
2016-09-21 13:37:28,618 [DEBUG] - _ Chocolatey:ChocolateyConfigCommand - Normal Run Mode _
2016-09-21 13:37:28,622 [INFO ] - Settings
2016-09-21 13:37:28,625 [INFO ] - cacheLocation = | Cache location if not TEMP folder.
2016-09-21 13:37:28,627 [INFO ] - containsLegacyPackageInstalls = true | Install has packages installed prior to 0.9.9 series.
2016-09-21 13:37:28,628 [INFO ] - commandExecutionTimeoutSeconds = 3600 | Default timeout for command execution.
2016-09-21 13:37:28,630 [INFO ] - proxy = | Explicit proxy location.
2016-09-21 13:37:28,631 [INFO ] - proxyUser = | Optional proxy user.
2016-09-21 13:37:28,634 [INFO ] - proxyPassword = | Optional proxy password. Encrypted.
2016-09-21 13:37:28,636 [INFO ] - webRequestTimeoutSeconds = 60 | Default timeout for web requests. Available in 0.9.10+.
The text was updated successfully, but these errors were encountered: