Check if `rustup` is installed (aka: Is in the `PATH`).
()
| 13 | |
| 14 | /// Check if `rustup` is installed (aka: Is in the `PATH`). |
| 15 | pub(crate) fn has_rust_up() -> bool { |
| 16 | match std::env::consts::OS { |
| 17 | "linux" | "freebsd" | "netbsd" | "openbsd" | "solaris" | "macos" => find_executable("rustup").is_some(), |
| 18 | "windows" => find_executable("rustup.exe").is_some(), |
| 19 | unsupported_os => { |
| 20 | eprintln!("This OS may be unsupported for `rustup`: {unsupported_os}"); |
| 21 | false |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | /// Check if `rustfmt` is installed (aka: Is in the `PATH`). |
| 27 | pub(crate) fn has_rust_fmt() -> bool { |
no test coverage detected
searching dependent graphs…