diff options
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 5219471f2..740cec790 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -77,6 +77,7 @@ pub enum DenoSubcommand { Upgrade { dry_run: bool, force: bool, + canary: bool, version: Option<String>, output: Option<PathBuf>, ca_file: Option<String>, @@ -625,6 +626,7 @@ fn upgrade_parse(flags: &mut Flags, matches: &clap::ArgMatches) { let dry_run = matches.is_present("dry-run"); let force = matches.is_present("force"); + let canary = matches.is_present("canary"); let version = matches.value_of("version").map(|s| s.to_string()); let output = if matches.is_present("output") { let install_root = matches.value_of("output").unwrap(); @@ -636,6 +638,7 @@ fn upgrade_parse(flags: &mut Flags, matches: &clap::ArgMatches) { flags.subcommand = DenoSubcommand::Upgrade { dry_run, force, + canary, version, output, ca_file, @@ -951,6 +954,11 @@ update to a different location, use the --output flag .short("f") .help("Replace current exe even if not out-of-date"), ) + .arg( + Arg::with_name("canary") + .long("canary") + .help("Upgrade to canary builds"), + ) .arg(ca_file_arg()) } @@ -1589,6 +1597,7 @@ mod tests { subcommand: DenoSubcommand::Upgrade { force: true, dry_run: true, + canary: false, version: None, output: None, ca_file: None, @@ -2991,6 +3000,7 @@ mod tests { subcommand: DenoSubcommand::Upgrade { force: false, dry_run: false, + canary: false, version: None, output: None, ca_file: Some("example.crt".to_owned()), |