DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Mechanism to allow resources to affect `dsc` exit code

Open SteveL-MSFT opened this issue 8 months ago • 0 comments

Summary of the new feature / enhancement

Example is the Assertion resource, if the assert fails, that resource has a specific error code, but when it gets received by parent dsc process, that simply becomes exit 2 DSC error. Would be good to have ability for resources to set the dsc exit code like JSON Parsing, invalid input, Assert, etc...

This can help higher level tools present information to the user.

Proposed technical implementation details (optional)

Resources currently return an error trace, maybe we can have an enum of error categories that is a property of the error JSON trace. Last one wins.

SteveL-MSFT avatar Apr 04 '25 17:04 SteveL-MSFT