silence the which command

master
Rasmus Rosengren 2 years ago
parent 811b20e171
commit a1a018fe7d
Signed by: rsrp
SSH Key Fingerprint: SHA256:vdAo4Qg/MlIkxR5BRTABqMRJ1sGSVlUcIciriaE3cNU
  1. 2
      src/utils.rs

@ -62,6 +62,8 @@ pub fn remove_dir_if_empty(path: &Path) -> anyhow::Result<()> {
pub fn command_exists(command: &str) -> bool {
std::process::Command::new("which")
.arg(&command)
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.status()
.is_ok()
}

Loading…
Cancel
Save