Add stdin
to run_make_support::command::Command
This commit is contained in:
parent
6db3289de7
commit
5a66a796fc
@ -36,8 +36,10 @@ impl Command {
|
|||||||
Self { cmd: StdCommand::new(program), stdin: None, drop_bomb: DropBomb::arm(program) }
|
Self { cmd: StdCommand::new(program), stdin: None, drop_bomb: DropBomb::arm(program) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_stdin(&mut self, stdin: Box<[u8]>) {
|
/// Specify a stdin input
|
||||||
self.stdin = Some(stdin);
|
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
||||||
|
self.stdin = Some(input.as_ref().to_vec().into_boxed_slice());
|
||||||
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Specify an environment variable.
|
/// Specify an environment variable.
|
||||||
|
@ -171,7 +171,7 @@ impl LlvmFilecheck {
|
|||||||
|
|
||||||
/// Pipe a read file into standard input containing patterns that will be matched against the .patterns(path) call.
|
/// Pipe a read file into standard input containing patterns that will be matched against the .patterns(path) call.
|
||||||
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
||||||
self.cmd.set_stdin(input.as_ref().to_vec().into_boxed_slice());
|
self.cmd.stdin(input);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ impl Rustc {
|
|||||||
|
|
||||||
/// Specify a stdin input
|
/// Specify a stdin input
|
||||||
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
||||||
self.cmd.set_stdin(input.as_ref().to_vec().into_boxed_slice());
|
self.cmd.stdin(input);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ impl Rustdoc {
|
|||||||
|
|
||||||
/// Specify a stdin input
|
/// Specify a stdin input
|
||||||
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
pub fn stdin<I: AsRef<[u8]>>(&mut self, input: I) -> &mut Self {
|
||||||
self.cmd.set_stdin(input.as_ref().to_vec().into_boxed_slice());
|
self.cmd.stdin(input);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user