-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow scripts to be run with version flags #2798
Comments
I also don't like how Deno unexpectedly consumes flags after the script name when it recognises them. @dev-nicolaos You can currently run The built-in argument passing is pretty bare-bones. Check out https://github.com/denoland/deno_std/blob/master/flags/README.md. |
Yeah, we shouldn't do that. |
I think any arguments after the script name should be passed to the script even without |
A nice thing to keep this convenience might be to remap |
Using |
Should be fixed with #3389 landed |
Description
As a developer, I would like to be able to consume the
-v
or--version
flags in my application. I'd prefer that if a script is provided, Deno ignore the version flag and instead pass it on toDeno.args
. Currently if I run a script with either flag, Deno prints out its internal version information as if I had rundeno version
deno --version
deno -v
Steps to Reproduce
test.ts
containing the following codedeno test.ts
ordeno run test.ts
[ "test.ts" ]
deno test.ts --version
deno test.ts -v
deno run test.ts --version
deno run test.ts -v
Additional Context
The text was updated successfully, but these errors were encountered: