Skip to content
Myr

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

3 files+13 added−47 removed

modified:src/exec/command.rs+1 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));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 lines
modified:Cargo.lock+11 added-45 removed
26 unmodified lines
27checksum = "c91f1f46651137be86f3a2b9a8359f9ab421d04d941c62b5982e1ca21113adf9"2829[[package]]30name = "argmax"31version = "0.3.0"31version = "0.3.1"32source = "registry+https://github.com/rust-lang/crates.io-index"33checksum = "932fb17af6e53a41ce7312f1ae1ba2a6f3f613fe36f38ad655b212906eb9657f"33checksum = "5b7e3ef5e3a7f2c5e5a49d90ad087c03d38258e75155daac64deb62c50972c66"34dependencies = [35 "lazy_static",36 "libc",37 "nix 0.23.1",37 "nix",38]3940[[package]]41name = "atty"
98 unmodified lines
140]141142[[package]]143name = "ctrlc"144version = "3.2.3"144version = "3.2.2"145source = "registry+https://github.com/rust-lang/crates.io-index"146checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"146checksum = "b37feaa84e6861e00a1f5e5aa8da3ee56d605c9992d33e082786754828e20865"147dependencies = [148 "nix 0.25.0",148 "nix",149 "winapi",150]151152[[package]]
55 unmodified lines
208 "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 lines
352checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"353354[[package]]355name = "libc"356version = "0.2.132"356version = "0.2.126"357source = "registry+https://github.com/rust-lang/crates.io-index"358checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"358checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"359360[[package]]361name = "log"362version = "0.4.17"
18 unmodified lines
381source = "registry+https://github.com/rust-lang/crates.io-index"382checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"383384[[package]]385name = "memoffset"386version = "0.6.5"387source = "registry+https://github.com/rust-lang/crates.io-index"388checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"389dependencies = [390 "autocfg",391]392393[[package]]385name = "nix"395version = "0.23.1"396source = "registry+https://github.com/rust-lang/crates.io-index"397checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"398dependencies = [399 "bitflags",400 "cc",401 "cfg-if",402 "libc",403 "memoffset",404]405406[[package]]407name = "nix"386version = "0.24.2"387source = "registry+https://github.com/rust-lang/crates.io-index"388checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"389dependencies = [
2 unmodified lines
392 "libc",393]394395[[package]]418name = "nix"419version = "0.25.0"420source = "registry+https://github.com/rust-lang/crates.io-index"421checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"422dependencies = [423 "autocfg",424 "bitflags",425 "cfg-if",426 "libc",427]428429[[package]]396name = "normpath"397version = "0.3.2"398source = "registry+https://github.com/rust-lang/crates.io-index"399checksum = "04aaf5e9cb0fbf883cc0423159eacdf96a9878022084b35c462c428cab73bcaf"
31 unmodified lines
431]432433[[package]]434name = "once_cell"469version = "1.13.1"435version = "1.14.0"436source = "registry+https://github.com/rust-lang/crates.io-index"471checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"437checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"438439[[package]]440name = "os_str_bytes"441version = "6.1.0"
365 unmodified lines
modified:Cargo.toml+1 added-1 removed