Function fake_tty::make_script_command
source · [−]Expand description
Wraps the command in the script
command that can execute it
pretending to be a tty.
Examples
use std::process::{Command, Stdio};
use fake_tty::make_script_command;
let output = make_script_command("ls", Some("bash")).unwrap()
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output().unwrap();
assert!(output.status.success());