Fix terminal output redirection when piping stdout

Now, when you do `xplr > out.txt` and invoke the terminal, the stdout
won't be redirected.
This commit is contained in:
Arijit Basu 2021-04-24 08:50:16 +05:30 committed by Arijit Basu
parent 680aeb053c
commit d0c5801474

View File

@ -46,7 +46,7 @@ fn call(app: &app::App, cmd: app::Command, silent: bool) -> io::Result<ExitStatu
let (stdin, stdout, stderr) = if silent {
(Stdio::null(), Stdio::null(), Stdio::null())
} else {
(Stdio::inherit(), Stdio::inherit(), Stdio::inherit())
(get_tty()?.into(), get_tty()?.into(), get_tty()?.into())
};
Command::new(cmd.command.clone())