Skip to content

Commit

Permalink
Fix output capturing
Browse files Browse the repository at this point in the history
  • Loading branch information
camsteffen committed Jan 10, 2022
1 parent b66dbe8 commit 7cf4f44
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions clippy_dev/src/fmt.rs
Expand Up @@ -141,8 +141,11 @@ fn exec(
println!("{}", format_command(&program, &dir, args));
}

let child = Command::new(&program).current_dir(&dir).args(args.iter()).spawn()?;
let output = child.wait_with_output()?;
let output = Command::new(&program)
.current_dir(&dir)
.args(args.iter())
.output()
.unwrap();
let success = output.status.success();

if !context.check && !success {
Expand Down

0 comments on commit 7cf4f44

Please sign in to comment.