-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add preparse hook for --flags-dir #1536
Conversation
QA notes: bumped oclif/core and plugins-core in plugin-data => 3.2.1, create a file called
✅ with --json gives good json results
✅ empty boolean |
Fantastic 🤩 ! I'm not sure I understand what you mean here though:
Does this mean that it will be possible to create a json file in which the keys will be the flags, and the associated values will be their state? |
@Alfystar Unfortunately, no - the idea here is that you can have a directory that contains files, each of which map to a flag. For instance, you could run a deploy like this:
Or with
And the
And each of those files contains the value for the flag (e.g. the None of those files require extensions EXCEPT if the contents of the file are going to be JSON. In that case you need to add the |
What does this PR do?
Adds
preparse
hook (depends on oclif/core#1005) to handle--flags-dir
flag--flags-dir
will read files from the provided directory and insert them in the argv before the command's flags are parsed..json
in order for it to correctly render the json in the argvno-<flag>
, if the boolean flag supports it.--flag val1 --flag --val2 --flag --val3
--flags-dir
- unless the flag supportsmultiple
, in which case they will all be combined to the final argv.--flags-dir
is not present--flags-dir
definitionWhat issues does this PR fix or reference?
@W-15285609@
forcedotcom/cli#2346
forcedotcom/cli#2670
solves forcedotcom/cli#2260 (when PDR gets updated)