diff --git a/src/rustup/toolchain.rs b/src/rustup/toolchain.rs index c7e595503c..ae31b9572e 100644 --- a/src/rustup/toolchain.rs +++ b/src/rustup/toolchain.rs @@ -636,12 +636,14 @@ impl<'a> Toolchain<'a> { .expect("installed manifest should have a known target"); if targ_pkg.components.contains(&component) { - return Err( + // Treat it as a warning, see https://github.com/rust-lang/rustup.rs/issues/441 + return Ok(println!( + "{}", ErrorKind::AddingRequiredComponent( self.name.to_string(), component.description(&manifest), - ).into(), - ); + ), + )); } if !targ_pkg.extensions.contains(&component) { diff --git a/tests/cli-v2.rs b/tests/cli-v2.rs index 0c2af955a7..ef83821ae1 100644 --- a/tests/cli-v2.rs +++ b/tests/cli-v2.rs @@ -636,7 +636,7 @@ fn add_target_host() { setup(&|config| { let trip = TargetTriple::from_build(); expect_ok(config, &["rustup", "default", "nightly"]); - expect_err(config, &["rustup", "target", "add", &trip.to_string()], + expect_stdout_ok(config, &["rustup", "target", "add", &trip.to_string()], for_host!("component 'rust-std' for target '{0}' was automatically added because it is required for toolchain 'nightly-{0}'")); }); }