mirror of https://github.com/sharkdp/fd.git
Use to_string_lossy to avoid relying on Debug-outputs
This commit is contained in:
parent
90e860c7a5
commit
d6b1d16bfc
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue