diff --git a/src/rustup-cli/self_update.rs b/src/rustup-cli/self_update.rs index 18a8ed2f8b..b5de565fde 100644 --- a/src/rustup-cli/self_update.rs +++ b/src/rustup-cli/self_update.rs @@ -219,9 +219,16 @@ pub fn install(no_prompt: bool, verbose: bool, try!(do_pre_install_sanity_checks()); try!(do_anti_sudo_check(no_prompt)); - if !no_prompt && !try!(do_msvc_check(&opts)) { - info!("aborting installation"); - return Ok(()); + if !try!(do_msvc_check(&opts)) { + if no_prompt { + warn!("installing msvc toolchain without its prerequisites"); + } else { + term2::stdout().md(MSVC_MESSAGE); + if !try!(common::confirm("\nContinue? (Y/n)", true)) { + info!("aborting installation"); + return Ok(()); + } + } } if !no_prompt { @@ -463,10 +470,7 @@ fn do_msvc_check(opts: &InstallOpts) -> Result { let installing_msvc = opts.default_host_triple.contains("msvc"); let have_msvc = windows_registry::find_tool(&opts.default_host_triple, "cl.exe").is_some(); if installing_msvc && !have_msvc { - term2::stdout().md(MSVC_MESSAGE); - if !try!(common::confirm("\nContinue? (Y/n)", true)) { - return Ok(false); - } + return Ok(false); } Ok(true)