(self)
| 23 | } |
| 24 | |
| 25 | pub fn build(self) -> Command { |
| 26 | let mut command = Command::new(&self.program); |
| 27 | command.args(&self.argv); |
| 28 | command.envs(&self.envs); |
| 29 | if let Some(cwd) = self.cwd { |
| 30 | command.current_dir(cwd); |
| 31 | } |
| 32 | command |
| 33 | } |
| 34 | |
| 35 | pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self { |
| 36 | self.argv.push(arg.as_ref().to_owned()); |