You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1193: suggest reinstalling the toolchain r=Emilgardis a=Emilgardis
also fixes suggestion when using wrong channel
resolves#1192
Co-authored-by: Emil Gardström <[email protected]>
Copy file name to clipboardExpand all lines: src/rustup.rs
+14-8
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
use std::path::PathBuf;
2
2
use std::process::Command;
3
3
4
-
use color_eyre::owo_colors::OwoColorize;
5
-
use color_eyre::SectionExt;
6
4
use rustc_version::{Channel,Version};
7
5
8
6
usecrate::errors::*;
@@ -93,14 +91,22 @@ pub fn available_targets(
93
91
.suggestion("is rustup installed?")?;
94
92
95
93
if !output.status.success(){
96
-
ifString::from_utf8_lossy(&output.stderr).contains("is a custom toolchain"){
97
-
returnErr(eyre::eyre!("`{toolchain}` is a custom toolchain.").with_section(|| r#"To use this toolchain with cross, you'll need to set the environment variable `CROSS_CUSTOM_TOOLCHAIN=1`
98
-
cross will not attempt to configure the toolchain further so that it can run your binary."#.header("Suggestion".bright_cyan())));
0 commit comments