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

Tweaks to arg_hacks and add v8-flags to repl #3409

Merged
merged 3 commits into from
Nov 27, 2019

Conversation

kevinkassimo
Copy link
Contributor

@kevinkassimo kevinkassimo commented Nov 27, 2019

Slight tweak to arg_hacks.
Now:

deno => deno repl
deno -h => deno -h
deno -L=debug => deno repl -L=debug
deno main.ts => deno run main.ts
deno -L=debug -A main.ts => deno run -L=debug -A main.ts

This is not a perfect solution since it does not handle cases like -L debug and would treat debug as the main module name if subcommand run is not provided.

Also fixes deno run without main module crash by instead printing out an error message Please provide a name to the main script to run.

Also adds --v8-flags as a flag to deno repl (can be helpful to do some command-line v8 testings)

cli/flags.rs Outdated
.takes_value(true)
.use_delimiter(true)
.require_equals(true)
.help("Set V8 command line options. For help: --v8-flags=--help"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create a function v8_flags_arg() (similar to reload_arg()) so that this bit of code can be shared between repl and run

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks - I should have been more careful in the refactor

@ry ry merged commit 3451c5f into denoland:master Nov 27, 2019
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants