Simplistic "Command not found" error message
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 cbc6dde · Browse files · 3 files·+13 added−47 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+13 added−47 removed
- other:+13 added−47 removed
Provenance
- Commit
c7370ca- Tree
37f264f- Author
Marie Katrine Ekeberg <mke@themkat.net>- Committer
David Peter <sharkdp@users.noreply.github.com>- Parent
cbc6dde
3 files changed+13 added−47 removed
modified:src/exec/command.rs+1 added-1 removed
94 unmodified lines95 96 pub 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));99+ print_error(format!("Command not found: {:?}", cmd.get_program()));100 ExitCode::GeneralError101 }102 (_, err) => {103 print_error(format!("Problem while executing command: {}", err));4 unmodified linesmodified:Cargo.lock+11 added-45 removed
26 unmodified lines27 checksum = "c91f1f46651137be86f3a2b9a8359f9ab421d04d941c62b5982e1ca21113adf9"28 29 [[package]]30 name = "argmax"31-version = "0.3.0"31+version = "0.3.1"32 source = "registry+https://github.com/rust-lang/crates.io-index"33-checksum = "932fb17af6e53a41ce7312f1ae1ba2a6f3f613fe36f38ad655b212906eb9657f"33+checksum = "5b7e3ef5e3a7f2c5e5a49d90ad087c03d38258e75155daac64deb62c50972c66"34 dependencies = [35 "lazy_static",36 "libc",37- "nix 0.23.1",37+ "nix",38 ]39 40 [[package]]41 name = "atty"98 unmodified lines140 ]141 142 [[package]]143 name = "ctrlc"144-version = "3.2.3"144+version = "3.2.2"145 source = "registry+https://github.com/rust-lang/crates.io-index"146-checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"146+checksum = "b37feaa84e6861e00a1f5e5aa8da3ee56d605c9992d33e082786754828e20865"147 dependencies = [148- "nix 0.25.0",148+ "nix",149 "winapi",150 ]151 152 [[package]]55 unmodified lines208 "ignore",209 "jemallocator",210 "libc",211 "lscolors",212- "nix 0.24.2",212+ "nix",213 "normpath",214 "num_cpus",215 "once_cell",216 "regex",135 unmodified lines352 checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"353 354 [[package]]355 name = "libc"356-version = "0.2.132"356+version = "0.2.126"357 source = "registry+https://github.com/rust-lang/crates.io-index"358-checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"358+checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"359 360 [[package]]361 name = "log"362 version = "0.4.17"18 unmodified lines381 source = "registry+https://github.com/rust-lang/crates.io-index"382 checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"383 384 [[package]]385-name = "memoffset"386-version = "0.6.5"387-source = "registry+https://github.com/rust-lang/crates.io-index"388-checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"389-dependencies = [390- "autocfg",391-]392-393-[[package]]385 name = "nix"395-version = "0.23.1"396-source = "registry+https://github.com/rust-lang/crates.io-index"397-checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"398-dependencies = [399- "bitflags",400- "cc",401- "cfg-if",402- "libc",403- "memoffset",404-]405-406-[[package]]407-name = "nix"386 version = "0.24.2"387 source = "registry+https://github.com/rust-lang/crates.io-index"388 checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"389 dependencies = [2 unmodified lines392 "libc",393 ]394 395 [[package]]418-name = "nix"419-version = "0.25.0"420-source = "registry+https://github.com/rust-lang/crates.io-index"421-checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"422-dependencies = [423- "autocfg",424- "bitflags",425- "cfg-if",426- "libc",427-]428-429-[[package]]396 name = "normpath"397 version = "0.3.2"398 source = "registry+https://github.com/rust-lang/crates.io-index"399 checksum = "04aaf5e9cb0fbf883cc0423159eacdf96a9878022084b35c462c428cab73bcaf"31 unmodified lines431 ]432 433 [[package]]434 name = "once_cell"469-version = "1.13.1"435+version = "1.14.0"436 source = "registry+https://github.com/rust-lang/crates.io-index"471-checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"437+checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"438 439 [[package]]440 name = "os_str_bytes"441 version = "6.1.0"365 unmodified linesmodified:Cargo.toml+1 added-1 removed
34 unmodified lines3536373839394041424344 unmodified lines34 unmodified linesversion_check = "0.9"
[dependencies]ansi_term = "0.12"argmax = "0.3.0"argmax = "0.3.1"atty = "0.2"ignore = "0.4.3"num_cpus = "1.13"regex = "1.6.0"44 unmodified lines