(
program: PathBuf,
args: [&str; N],
stdin: &str,
)
| 1447 | } |
| 1448 | |
| 1449 | fn run_command_text_with_stdin<const N: usize>( |
| 1450 | program: PathBuf, |
| 1451 | args: [&str; N], |
| 1452 | stdin: &str, |
| 1453 | ) -> Result<String, AppError> { |
| 1454 | let output = run_command_with_stdin(program, args, Some(stdin.as_bytes()))?; |
| 1455 | String::from_utf8(output) |
| 1456 | .map_err(|error| AppError::native(format!("Command returned non-UTF8 output: {error}"))) |
| 1457 | } |
| 1458 | |
| 1459 | fn run_command_bytes<const N: usize>( |
| 1460 | program: PathBuf, |
no test coverage detected