Skip to content

Commit 0d01900

Browse files
committed
fix: make sure progress is shown
1 parent 7bbc6eb commit 0d01900

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

crates/cargo-capsec/src/deep.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,20 @@ pub fn run_deep_analysis(
7070
let deep_result = capsec_std::process::command("cargo", spawn_cap)
7171
.ok()
7272
.and_then(|mut cmd| {
73+
let is_tty = std::io::IsTerminal::is_terminal(&std::io::stderr());
7374
cmd.arg("check")
7475
.current_dir(path)
7576
.env("RUSTC_WRAPPER", "capsec-driver")
7677
.env("CAPSEC_DEEP_OUTPUT", &output_path)
7778
.env("CAPSEC_CRATE_VERSION", "0.0.0")
7879
.env("CARGO_TARGET_DIR", &deep_target_dir)
7980
.env("RUSTUP_TOOLCHAIN", toolchain)
80-
.env(
81-
"CAPSEC_DEEP_PROGRESS",
82-
if std::io::IsTerminal::is_terminal(&std::io::stderr()) {
83-
"1"
84-
} else {
85-
""
86-
},
87-
)
88-
.output()
89-
.ok()
81+
.env("CAPSEC_DEEP_PROGRESS", if is_tty { "1" } else { "" });
82+
// Inherit stderr so progress lines reach the terminal
83+
if is_tty {
84+
cmd.stderr(std::process::Stdio::inherit());
85+
}
86+
cmd.output().ok()
9087
});
9188

9289
// Build name/version lookup for patching MIR findings

0 commit comments

Comments
 (0)