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
A clean way to get pass through arguments? #1293
Comments
1/3: I think what you have might work if you just remove
|
2/3: The extra arguments actually get passed to the action handler too. (Currently undocumented, as I am not sure it is useful enough!)
|
3/3: But my preferred approach is to make it explicit as part of the command so it appears in the help too, like:
|
Thanks for the quick response.
|
This is the same behaviour with all three approaches. You still need the Like you had in your original post:
|
I see. I'm actually really surprised that |
Pull Request opened to add |
Hi, I'm writing a simple CLI tool that triggers the execution of another JS file which also takes command line arguments, but I couldn't figure out a clean way to get pass-through arguments. A short snipet written in TypeScript is shown below.
Then when I execute the CLI as
cli run executable.js -- --test-flag
, it doesnt' work becauseoptions.args
contains[ 'executable.js', '--test-flag' ]
, which seems to match the document though:Is there a better way to get an array of pass-through arguments, which excludes
<file>
and other potential positional arguments? Thanks!The text was updated successfully, but these errors were encountered: