Skip to content
Myr

Use to_string_lossy to avoid relying on Debug-outputs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Marie Katrine Ekeberg · committed by David Peter · parent 90e860c · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:src/exec/command.rs+4 added-1 removed
94 unmodified lines
9596pub fn handle_cmd_error(cmd: Option<&Command>, err: io::Error) -> ExitCode {97 match (cmd, err) {98 (Some(cmd), err) if err.kind() == io::ErrorKind::NotFound => {99 print_error(format!("Command not found: {:?}", cmd.get_program()));99 print_error(format!(100 "Command not found: {}",101 cmd.get_program().to_string_lossy()102 ));103 ExitCode::GeneralError104 }105 (_, err) => {106 print_error(format!("Problem while executing command: {}", err));
4 unmodified lines