diff options
-rw-r--r-- | src/util/process.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/process.rs b/src/util/process.rs index b333cea..dd8433f 100644 --- a/src/util/process.rs +++ b/src/util/process.rs @@ -63,7 +63,12 @@ where let pager_env = std::env::var("PAGER").unwrap_or_else(|_| String::from("less")); let pager_args: Vec<&str> = pager_env.split_whitespace().collect(); - if let Some(child_stdout) = command.stdout(process::Stdio::piped()).spawn()?.stdout { + if let Some(child_stdout) = command + .stdin(process::Stdio::null()) + .stdout(process::Stdio::piped()) + .spawn()? + .stdout + { process::Command::new(pager_args[0]) .args(&pager_args[1..]) .stdin(child_stdout) |