fn main() { let c = std::process::Command::new("sh") .args(["-c", "which gpg"]) .output() .expect("process creation failed"); let out = String::from_utf8_lossy(&c.stdout).to_string(); assert_ne!(out, String::new()); }