Exit codes not reliable
Prerequisites
- [x] Write a descriptive title.
- [x] Make sure you are able to repro it on the latest version
- [x] Search the existing issues.
Summary
I'm using PowerShell to create a resource but the exit codes are not as expected. I get an exit code of 2, even if coded to 0 upon exit of pwsh.exe.
Here is the repo and the launch.json has the test cases... ; https://github.com/IlleNilsson/Microsoft.DSC.v3.resource.venture
Steps to reproduce
Run the test in the launch.json file
Expected behavior
0
Actual behavior
2
Error details
Environment data
7.5.4
Version
3.1.1
Visuals
No response
I did a quick look through your resource implementation, and I'm having a little trouble following it. In any case, there's nothing DSC can do about an executable emitting the incorrect exit code - can you clarify whether the script is returning the wrong exit code unexpectedly or the script is returning the correct exit code and DSC is misinterpreting it?