Returns the command line as a string for debugging/testing purposes
(&self)
| 130 | |
| 131 | /// Returns the command line as a string for debugging/testing purposes |
| 132 | pub fn as_command_line(&self) -> String { |
| 133 | let mut parts: Vec<String> = vec![self.program.to_string_lossy().into_owned()]; |
| 134 | parts.extend( |
| 135 | self.argv |
| 136 | .iter() |
| 137 | .map(|arg| arg.to_string_lossy().into_owned()), |
| 138 | ); |
| 139 | shell_words::join(parts) |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | #[cfg(test)] |