Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-1059) Fix: Unable to change command execution timeout
When determining whether to use the default timeout, use the locally set variable instead of using a deprecated config settings value. Previously, when the deprecated value was set to "0" (the default), it would not allow setting an execution timeout to anything other than the default timeout of 2700. This has caused issues in newer installations of Chocolatey (not upgraded) as the value of 0 would not allow changing the execution timeout. It was looking at the deprecated timeout instead of what was currently set or what was in the actual configuration value. Fix this to look at the locally set variable that has already determined what the setting is and whether it evaluates to 0 (not able to parse or empty). However, also allow for an actual setting of "0", which means never time out (GH-1202) by looking at the string value prior to parsing to see if it was set to zero.
- Loading branch information