Skip to content

Commit b351a7d

Browse files
authored
Merge pull request #361 from Enselic/print-cmd
Print the command that is run if we are --verbose
2 parents 7f0ff94 + d9d5bcc commit b351a7d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ impl Opts {
226226
fn emit_cargo_output(&self) -> bool {
227227
self.verbosity >= 2
228228
}
229+
230+
fn emit_cmd(&self) -> bool {
231+
self.verbosity >= 1
232+
}
229233
}
230234

231235
#[derive(Debug, thiserror::Error)]

src/toolchains.rs

+4
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ impl Toolchain {
307307
cmd.stdout(default_stdio());
308308
cmd.stderr(default_stdio());
309309

310+
if cfg.args.emit_cmd() {
311+
eprintln!("Running `{cmd:?}`");
312+
}
313+
310314
let output = match cmd.output() {
311315
Ok(output) => output,
312316
Err(err) => {

0 commit comments

Comments
 (0)