Skip to content

Refactor --input and --input-file options #226

@michaeltlombardi

Description

@michaeltlombardi

Summary of the new feature / enhancement

The --input and --input-file options were added as global options in #217, but these options aren't actually global - they don't apply to the dsc schema, dsc completer, dsc resource schema, dsc resource list, or dsc resource export commands.

Instead, the CLI should be updated so that these options are local to the commands they apply to. This will also aid in the CLI ergonomics, so instead of these commands:

dsc --input-file ./example.dsc.config.yaml config set
dsc --p ./example.dsc.config.yaml config set

dsc --input $cfg config set
dsc --i $cfg config set

dsc --input $desired resource set --resource Microsoft.Windows/Registry
dsc -i $desired resource set -r Microsoft.Windows/Registry

Users would enter these commands:

dsc config set --path ./example.dsc.config.yaml
dsc config set -p ./example.dsc.config.yaml

dsc config set --document $cfg
dsc config set -d $cfg

dsc resource set --resource Microsoft.Windows/Registry --input $desired
dsc resource set -r Microsoft.Windows/Registry -i $desired

Proposed technical implementation details (optional)

  1. Remove the --input and --input-file global options.
  2. Add --path and --document options to the config * subcommands.
  3. Add --path and --input options to the resource get|set|test subcommands.

The new argument names are suggestions - could be --path and --input or --file and --data, whatever semantics the team thinks will work best.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions