Skip to content

Commit 9c0c3f9

Browse files
committed
Inherit stdin when using cargo run
Previously a pipe was made which could mess with stdin like in rust-lang#267. Closes rust-lang#267
1 parent 309bfe6 commit 9c0c3f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cargo/util/process_builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ impl ProcessBuilder {
5656
pub fn exec(&self) -> Result<(), ProcessError> {
5757
let mut command = self.build_command();
5858
command.stdout(InheritFd(1))
59-
.stderr(InheritFd(2));
59+
.stderr(InheritFd(2))
60+
.stdin(InheritFd(0));
6061

6162
let msg = || format!("Could not execute process `{}`",
6263
self.debug_string());

0 commit comments

Comments
 (0)