Use to_string_lossy to avoid relying on Debug-outputs
@@ -96,7 +96,10 @@ pub fn execute_commands<I: Iterator<Item = io::Result<Command>>>(
pub fn handle_cmd_error(cmd: Option<&Command>, err: io::Error) -> ExitCode {
match (cmd, err) {
(Some(cmd), err) if err.kind() == io::ErrorKind::NotFound => {
- print_error(format!("Command not found: {:?}", cmd.get_program()));
+ print_error(format!(
+ "Command not found: {}",
+ cmd.get_program().to_string_lossy()
+ ));
ExitCode::GeneralError
}
(_, err) => {
