+use std::{ env, process::{ Command, Output }, path::Path };
+
+fn exists_in_path<P>(filename: P) -> bool
+ where P: AsRef<Path> {
+ for path in env::split_paths(&env::var_os("PATH").unwrap()) {
+ if path.join(&filename).is_file() { return true; }
+ }
+ false
+}