Skip to content

Commit 70224f6

Browse files
committed
Output "installing..." message after consent prompt
This is particularly useful when `--auto-install-rust-toolchain` is used as the consent prompt isn't show and no indication at all of what's happening was given.
1 parent 92cd18a commit 70224f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/cargo-gpu/src/spirv_cli.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ impl SpirvCli {
103103
{
104104
log::debug!("toolchain {} is already installed", self.channel);
105105
} else {
106-
self.get_consent_for_toolchain_install(
107-
format!("Install Rust {} with `rustup`", self.channel).as_ref(),
108-
)?;
106+
let message = format!("Rust {} with `rustup`", self.channel);
107+
self.get_consent_for_toolchain_install(format!("Install {message}").as_ref())?;
108+
crate::user_output!("Installing {message}");
109109

110110
let output_toolchain_add = std::process::Command::new("rustup")
111111
.args(["toolchain", "add"])
@@ -141,9 +141,9 @@ impl SpirvCli {
141141
if all_components_installed {
142142
log::debug!("all required components are installed");
143143
} else {
144-
self.get_consent_for_toolchain_install(
145-
"Install toolchain components (rust-src, rustc-dev, llvm-tools) with `rustup`",
146-
)?;
144+
let message = "toolchain components (rust-src, rustc-dev, llvm-tools) with `rustup`";
145+
self.get_consent_for_toolchain_install(format!("Install {message}").as_ref())?;
146+
crate::user_output!("Installing {message}");
147147

148148
let output_component_add = std::process::Command::new("rustup")
149149
.args(["component", "add", "--toolchain"])

0 commit comments

Comments
 (0)