From f18aabc09c9cd53b5cfb9fce67054bf0a793c995 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Fri, 15 Jul 2016 15:29:01 -0700 Subject: [PATCH] Allow any toolchain to be specified as the default during rustup installation. --- src/rustup-cli/setup_mode.rs | 1 - tests/cli-inst-interactive.rs | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/rustup-cli/setup_mode.rs b/src/rustup-cli/setup_mode.rs index 20661716d4..26191f257c 100644 --- a/src/rustup-cli/setup_mode.rs +++ b/src/rustup-cli/setup_mode.rs @@ -32,7 +32,6 @@ pub fn main() -> Result<()> { .arg(Arg::with_name("default-toolchain") .long("default-toolchain") .takes_value(true) - .possible_values(&["stable", "beta", "nightly"]) .help("Choose a default toolchain to install")) .arg(Arg::with_name("no-modify-path") .long("no-modify-path") diff --git a/tests/cli-inst-interactive.rs b/tests/cli-inst-interactive.rs index 87d7fb4ff5..24c2f16e34 100644 --- a/tests/cli-inst-interactive.rs +++ b/tests/cli-inst-interactive.rs @@ -139,6 +139,18 @@ fn with_non_default_toolchain() { }); } +#[test] +fn with_non_release_channel_non_default_toolchain() { + setup(&|config| { + let out = run_input(config, &["rustup-init", "--default-toolchain=nightly-2015-01-02"], + "\n\n"); + assert!(out.ok); + + expect_stdout_ok(config, &["rustup", "show"], "nightly"); + expect_stdout_ok(config, &["rustup", "show"], "2015-01-02"); + }); +} + #[test] fn set_nightly_toolchain() { setup(&|config| {