diff --git a/crates/cargo-util/src/process_builder.rs b/crates/cargo-util/src/process_builder.rs index 714cc595eff4..43ef5debb97e 100644 --- a/crates/cargo-util/src/process_builder.rs +++ b/crates/cargo-util/src/process_builder.rs @@ -355,6 +355,8 @@ impl ProcessBuilder { let (mut child, argfile) = spawn(cmd)?; let out = child.stdout.take().unwrap(); let err = child.stderr.take().unwrap(); + // close stdin to prevent deadlock + drop(child.stdin.take().unwrap()); read2(out, err, &mut |is_out, data, eof| { let pos = if is_out { &mut stdout_pos