Stdout/stderr should be inherited

This commit is contained in:
Michael-F-Bryan
2022-11-23 17:49:32 +08:00
parent cab9e010f6
commit 8f28ea4c9f

View File

@@ -41,15 +41,13 @@ impl Add {
let bindings = self.lookup_bindings(&registry)?; let bindings = self.lookup_bindings(&registry)?;
let mut cmd = self.target()?.command(&bindings)?; let mut cmd = self.target()?.command(&bindings)?;
cmd.stdin(Stdio::null())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit());
println!("Running: {cmd:?}"); println!("Running: {cmd:?}");
let status = cmd let status = cmd.status().with_context(|| {
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.status()
.with_context(|| {
format!( format!(
"Unable to start \"{:?}\". Is it installed?", "Unable to start \"{:?}\". Is it installed?",
cmd.get_program() cmd.get_program()