tag | 49d939f50e838e48aad872e32f4b6637a1baa2f8 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Dec 06 22:03:51 2023 -0800 |
object | 901acedb151eabd06e890ed5c33404e9d853b692 |
aml_rkp_341114000 (10837468,com.google.android.rkpd)
commit | 901acedb151eabd06e890ed5c33404e9d853b692 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:26:24 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:26:24 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | 3667add4e523c701471a56046a0f3ca334281255 [diff] | |
parent | 878f532dd57bdcbce44364b7eecb1811140e99b7 [diff] |
Snap for 10453563 from 878f532dd57bdcbce44364b7eecb1811140e99b7 to mainline-rkpd-release Change-Id: I483fe47e04543eb4cf510bbc758edd0025b4ea95
A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.
To find which rustc executable binary is using.
use which::which; let result = which("rustc").unwrap(); assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
After enabling the regex
feature, find all cargo subcommand executables on the path:
use which::which_re; which_re(Regex::new("^cargo-.*").unwrap()).unwrap() .for_each(|pth| println!("{}", pth.to_string_lossy()));
The documentation is available online.