Skip to content
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: parse flags after script name #2596

merged 4 commits into from Jun 29, 2019


2 participants
Copy link

commented Jun 28, 2019

Resolved #2580

This PR add functionality to parse flags passed after script URL as Deno flags. Thanks to this you can now pass --reload (and all other recognized Deno flags) as last arg.


$ deno --allow-net --allow-read


  • parsing stops after double dash --
  • -h/--help and -v/--version are forwarded to Deno.args

This functionality works only for run command, ie. deno <script> and deno run <script>

CC @ry

bartlomieju added some commits Jun 28, 2019


This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2019

CI is failing due to denoland/registry#115

assert_eq!(subcommand, DenoSubcommand::Run);
assert_eq!(argv, svec!["deno", "script.ts", "--help", "--foo", "bar"]);

This comment has been minimized.

Copy link

ry Jun 28, 2019



@bartlomieju bartlomieju force-pushed the bartlomieju:feat-parse_script_args branch from e1a9333 to 6c7416a Jun 28, 2019


ry approved these changes Jun 29, 2019

Copy link

left a comment


@ry ry merged commit 38cf346 into denoland:master Jun 29, 2019

3 checks passed

Travis CI - Pull Request Build Passed
continuous-integration/appveyor/pr AppVeyor build succeeded
license/cla Contributor License Agreement is signed.

@bartlomieju bartlomieju deleted the bartlomieju:feat-parse_script_args branch Jun 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.