Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
-
1
-
Windows 2016-09-07
Description
Because of the way Powershell sets $LASTEXITCODE and $? and the somewhat confusing differences between the two. It is probably a good idea to add some documentation in the powershell module to explain the best way tell Puppet weather a script that you have run has succeeded or failed, both for the purposes of running scripts with an exec, or using that script with onlyif or unless.
ethan Probably has more idea of how to explain this than I do as he wrote the code and fixed MODULES-3399 which brought up this issue.
Attachments
Issue Links
- supports
-
MODULES-3399 PowerShell module 2.x - capturing exit codes from scripts fail
-
- Resolved
-
- links to