-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --input
and --input-file
to dsc
#217
Conversation
Non-blocking, but we may want to have a think about the UX for global options—currently, if I want to use both the format and input options, I have to run a command like: dsc -f pretty-json -i $desired resource test -r Example.Go/TSToy This isn't very ergonomic, esp since these options are provided before two layers of subcommands. From my perspective, this would be the more natural command: dsc resource test -f pretty-json -r Example.Go/TSToy -i $desired Is it possible to define option flags on the subcommands that override/define the globals for convenience? I haven't delved too deeply into clap, but in cobra you can define persistent options that work this way (define once, available on all child commands). |
@michaeltlombardi let's cover that topic as part of the cmdline review meeting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should review some of the argument names we are using and compare how they match up against pre-existing tools. However, I think we need this functionality and we can always change the names later.
This change updates the project changelog, reference documentation, and schemas for the recent PRs merged for the project: - PowerShell#206 - PowerShell#208 - PowerShell#211 - PowerShell#213 - PowerShell#215 - PowerShell#216 - PowerShell#217 The updates include: - Documenting the new `_exist` property, replacing `_ensure` for resources. This documentation update includes the schema definition, but doesn't regenerate the schema, which will be handled separately. - Documenting the new `completer` command. - Documenting the new `--input` and `--input-file` global options. - Adding a deprecation notice to the `_ensure` documentation. - Adding entries for all user-impacting changes to the changelog.
PR Summary
Add
-i | --input
and-p | --input-file
as ways to pass input todsc
instead of just via stdin. The two parameters are mutually exclusive. Currently, stdin is ignored if either of these parameters are used.PR Context
Fix #130