Skip to content
Myr

Update error message if command could not be found

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

authored by sharkdp · committed by sharkdp · parent 3c5d8a1 · Browse files · 1 file+14 added−2 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+14 added−2 removed

  • other:+14 added−2 removed

1 file+14 added−2 removed

modified:src/exec/command.rs+14 added-2 removed
30 unmodified lines
3132 let _ = stdout.lock().write_all(&output.stdout);33 let _ = stderr.lock().write_all(&output.stderr);34 }35 Err(why) => eprintln!("fd: exec error: {}", why),35 Err(why) => {36 if why.kind() == io::ErrorKind::NotFound {37 eprintln!("fd: execution error: command not found");38 } else {39 eprintln!("fd: execution error: {}", why);40 }41 }42 }43}4445/// Executes a command.
52 unmodified lines
98 let stderr = io::stderr();99 let _ = io::copy(&mut pout, &mut stdout.lock());100 let _ = io::copy(&mut perr, &mut stderr.lock());101 }96 Err(why) => eprintln!("fd: exec error: {}", why),102 Err(why) => {103 if why.kind() == io::ErrorKind::NotFound {104 eprintln!("fd: execution error: command not found");105 } else {106 eprintln!("fd: execution error: {}", why);107 }108 }109 }110}