always performing the check, printing a warning if it is not installed and -y passed
@@ -219,10 +219,17 @@ 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)) {
+ 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 {
let ref msg = try!(pre_install_msg(opts.no_modify_path));
@@ -463,11 +470,8 @@ fn do_msvc_check(opts: &InstallOpts) -> Result<bool> {
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);
}
- }
Ok(true)
}
