DSC icon indicating copy to clipboard operation
DSC copied to clipboard

`jsonInputArg` should allow for positional parameter

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

Summary of the new feature / enhancement

Currently, if your exe takes args as:

myResource <operation> <json>

Then jsonInputArg won't work. If you set it to empty string, then a literal empty string gets passed:

myResource get "" '{}'

Proposed technical implementation details (optional)

In the dsc.resource.json, if jsonInputArg is an empty string, then no arg should be passed and the json is just passed as a positional argument. I don't think there's a valid use case where the author wants an empty string passed along with the JSON (although the JSON could itself be empty).

This was found developing my C# example.

SteveL-MSFT avatar May 09 '25 01:05 SteveL-MSFT