diff options
author | Divya <hello@shortdiv.com> | 2020-05-04 06:35:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 13:35:00 +0200 |
commit | 36ad4e3b771356d30e0a43b2c43b85e69ce348cc (patch) | |
tree | 86329f0828ac6db6cfd7ab73f09507d403cffc8c /cli/flags.rs | |
parent | a913b7a1ba67849464d0314eee9851f59c22556b (diff) |
fix(install): Propagate --unstable flag (#5061)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 239382e03..decf3cb17 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -2054,6 +2054,30 @@ mod tests { } #[test] + fn install_unstable() { + let r = flags_from_vec_safe(svec![ + "deno", + "install", + "--unstable", + "https://deno.land/std/examples/colors.ts" + ]); + assert_eq!( + r.unwrap(), + Flags { + unstable: true, + subcommand: DenoSubcommand::Install { + name: None, + module_url: "https://deno.land/std/examples/colors.ts".to_string(), + args: svec![], + root: None, + force: false, + }, + ..Flags::default() + } + ); + } + + #[test] fn install_with_args() { let r = flags_from_vec_safe(svec![ "deno", |