Skip to content

Commit 1fe9366

Browse files
committed
feat(cli): show the toolchain path with rustup show active-toolchain --verbose
1 parent 7efb4bd commit 1fe9366

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/cli/rustup_mode.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,9 @@ fn show_active_toolchain(cfg: &Cfg<'_>, verbose: bool) -> Result<utils::ExitCode
10921092
if verbose {
10931093
writeln!(
10941094
cfg.process.stdout().lock(),
1095-
"compiler: {}",
1096-
toolchain.rustc_version()
1095+
"compiler: {}\npath: {}",
1096+
toolchain.rustc_version(),
1097+
toolchain.path().display(),
10971098
)?;
10981099
}
10991100
}

tests/suite/cli_rustup.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,13 @@ async fn show_active_toolchain_with_verbose() {
12491249
r"nightly-{0}
12501250
active because: it's the default toolchain
12511251
compiler: 1.3.0 (hash-nightly-2)
1252-
"
1252+
path: {1}
1253+
",
1254+
cx.config
1255+
.rustupdir
1256+
.join("toolchains")
1257+
.join(for_host!("nightly-{0}"))
1258+
.display()
12531259
),
12541260
r"",
12551261
)

0 commit comments

Comments
 (0)