mirror of
https://github.com/sharkdp/fd.git
synced 2026-08-30 17:07:43 +08:00
Use to_string_lossy to avoid relying on Debug-outputs
This commit is contained in:
committed by
David Peter
parent
90e860c7a5
commit
d6b1d16bfc
+4
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user