Skip to content

Commit 2cc0829

Browse files
jmqdrami3l
authored andcommittedApr 17, 2025·
Add toolchain_name to not installed bail msg
Regularly working with local custom toolchains that have reasonably high cardinality, having this diagnostic would've saved me a good chunk of time.
1 parent 52fce89 commit 2cc0829

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
 

‎src/config.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ impl<'a> Cfg<'a> {
679679
&& matches!(toolchain_name, ToolchainName::Custom(_))
680680
{
681681
bail!(
682-
"custom toolchain specified in override file '{}' is not installed",
682+
"custom toolchain '{}' specified in override file '{}' is not installed",
683+
toolchain_name,
683684
toolchain_file.display()
684685
)
685686
}

‎tests/suite/cli_rustup.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2517,13 +2517,13 @@ async fn file_override_not_installed_custom() {
25172517
cx.config
25182518
.expect_err(
25192519
&["rustup", "show", "active-toolchain"],
2520-
"custom toolchain specified in override file",
2520+
"custom toolchain 'gumbo' specified in override file",
25212521
)
25222522
.await;
25232523
cx.config
25242524
.expect_err(
25252525
&["rustc", "--version"],
2526-
"custom toolchain specified in override file",
2526+
"custom toolchain 'gumbo' specified in override file",
25272527
)
25282528
.await;
25292529
}
@@ -2538,13 +2538,13 @@ async fn file_override_not_installed_custom_toml() {
25382538
cx.config
25392539
.expect_err(
25402540
&["rustup", "show", "active-toolchain"],
2541-
"custom toolchain specified in override file",
2541+
"custom toolchain 'i-am-the-walrus' specified in override file",
25422542
)
25432543
.await;
25442544
cx.config
25452545
.expect_err(
25462546
&["rustc", "--version"],
2547-
"custom toolchain specified in override file",
2547+
"custom toolchain 'i-am-the-walrus' specified in override file",
25482548
)
25492549
.await;
25502550
}

0 commit comments

Comments
 (0)
Please sign in to comment.