diff options
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 138d77359..588f75dbb 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -407,6 +407,7 @@ pub struct Flags { pub seed: Option<u64>, pub unstable: bool, pub unstable_bare_node_builtlins: bool, + pub unstable_byonm: bool, pub unsafely_ignore_certificate_errors: Option<Vec<String>>, pub v8_flags: Vec<String>, } @@ -803,9 +804,9 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> { flags.unstable = true; } - if matches.get_flag("unstable-bare-node-builtins") { - flags.unstable_bare_node_builtlins = true; - } + flags.unstable_bare_node_builtlins = + matches.get_flag("unstable-bare-node-builtins"); + flags.unstable_byonm = matches.get_flag("unstable-byonm"); if matches.get_flag("quiet") { flags.log_level = Some(Level::Error); @@ -912,6 +913,15 @@ fn clap_root() -> Command { .global(true), ) .arg( + Arg::new("unstable-byonm") + .long("unstable-byonm") + .help("Enable unstable 'bring your own node_modules' feature") + .env("DENO_UNSTABLE_BYONM") + .value_parser(FalseyValueParser::new()) + .action(ArgAction::SetTrue) + .global(true), + ) + .arg( Arg::new("log-level") .short('L') .long("log-level") |