PowerShell / PowerShell/DSC

`jsonInputArg` should allow for positional parameter

Open
#796 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement Needs Triage
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with issue #796 and trace the Rust handling of jsonInputArg in dsc.resource.json, using the described C# example to understand the positional-argument form. Done means an empty jsonInputArg causes no empty argument to be emitted and the JSON is passed positionally; verify this behavior with the existing test coverage if present.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.