You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ec validate input should take positional arguments instead of named arguments for the list of files to validate, i.e. ec validate input spam.yaml instead of ec validate input --file spam.yaml
Why? Because of all the arguments that command accepts, the input files are likely the thing to have a variable length. Consider the case where you have a bunch of yaml files in a directory. Assuming a shell is being used, positional arguments would look like ec validate input *.yaml, and named parameter like ec validate input $(find . -name '*.yaml' -printf '--file=%p ') . The second version relies on the find utility which may not be available in some contexts.
Change ec validate input to take positional arguments. Each is treated as a file to be validated.
For backwards compatibility, continue to accept the --file parameter, but be sure to mark it as deprecated. If both --file and positional arguments are provided, combine the values.
The text was updated successfully, but these errors were encountered:
The
ec validate input
should take positional arguments instead of named arguments for the list of files to validate, i.e.ec validate input spam.yaml
instead ofec validate input --file spam.yaml
Why? Because of all the arguments that command accepts, the input files are likely the thing to have a variable length. Consider the case where you have a bunch of yaml files in a directory. Assuming a shell is being used, positional arguments would look like
ec validate input *.yaml
, and named parameter likeec validate input $(find . -name '*.yaml' -printf '--file=%p ')
. The second version relies on thefind
utility which may not be available in some contexts.See cobra's docs on positional arguments.
Acceptance Criteria
ec validate input
to take positional arguments. Each is treated as a file to be validated.--file
parameter, but be sure to mark it as deprecated. If both--file
and positional arguments are provided, combine the values.The text was updated successfully, but these errors were encountered: