chocolatey / chocolatey/ChocolateyGUI
Chocolatey GUI in Background Mode behaves strangely with exitOnRebootDetected enabled
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 271
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 1
Description
Log snippet:
```
2021-12-09 11:33:37.854 +09:00 [Information] --- start of agent ---
2021-12-09 11:33:39.528 +09:00 [Information] 2 validations performed. 1 success(es), 0 warning(s), and 1 error(s).
2021-12-09 11:33:39.529 +09:00 [Information]
2021-12-09 11:33:39.529 +09:00 [Information] Validation Errors:
2021-12-09 11:33:39.530 +09:00 [Information] - When attempting to halt execution of a Chocolatey command based on a
2021-12-09 11:33:39.530 +09:00 [Information] request for a system reboot, it is necessary to have the
2021-12-09 11:33:39.530 +09:00 [Information] usePackageExitCodes feature enabled. Use the following command:
2021-12-09 11:33:39.531 +09:00 [Information] choco feature enable -name=usePackageExitCodes
2021-12-09 11:33:39.531 +09:00 [Information] to enable this feature (exit code 1).
2021-12-09 11:33:39.531 +09:00 [Information]
2021-12-09 11:33:39.844 +09:00 [Information]
2021-12-09 11:33:39.862 +09:00 [Information] --- end of agent ---
```
Notes:
· Package installation works (as non-admin user) from chocolatey cli.
· Chocolatey agent is installed under Local System user.
usePackageExitCodes is already enabled. Below is from choco config list command.
[x] usePackageExitCodes - Use Package Exit Codes - Package scripts can provide exit codes. With this on, package exit
codes will be what choco uses for exit when non-zero (this value can come from a dependency package). Chocolatey
defines valid exit codes as 0, 1605, 1614, 1641, 3010. With this feature off, choco will exit with 0, 1, or -1
(matching previous behavior). Available in 0.9.10+.
[x] exitOnRebootDetected - Exit On Reboot Detected - Stop running install, upgrade, or uninstall when a reboot request
is detected. Requires 'usePackageExitCodes' feature to be turned on. Will exit with either 350 or 1604. When it exits
with 350, it means pending reboot discovered prior to running operation. When it exits with 1604, it means some work
completed prior to reboot request being detected. Available in 0.10.12+.
Software version:
chocolatey: 0.11.1
chocolatey-agent: 0.12.0
chocolateygui: 0.19.0
## References
[Internal Ticket](https://chocolatey.zendesk.com/agent/tickets/12483)
Contributor guide
Research direction
No source files, tests, or entry points are identified in the issue. Start by reproducing Chocolatey GUI Background Mode with exitOnRebootDetected enabled and usePackageExitCodes already enabled, then compare the observed behavior with the expected reboot handling and verify the validation error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100