Closed Hoverbear closed 2 years ago
If we fail to execute `cargo`, would should produce a nice error message for this relatively predictable error scenario. Currently the output looks like this: ``` root@ubuntu-s-4vcpu-8gb-amd-nyc1-01:~/tokenizers/tokenizers# ~/fsm shell Error: 0: Could not execute `cargo metadata` 1: No such file or directory (os error 2) Location: src/dev_env.rs:78 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0: fsm::dev_env::add_deps_from_cargo with project_dir=/root/tokenizers/tokenizers at src/dev_env.rs:60 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. ``` but we could probably do something a bit nicer, like: ``` $ fsm shell Could not execute `cargo metadata`. Is `cargo` installed? Get instructions for installing Cargo: https://www.rust-lang.org/tools/install ``` and exiting 1.
I don't think the ` should be colored.