pub fn resolve_executable(
program: &str,
cwd: &Path,
env: &[(String, String)],
) -> Option<PathBuf>Expand description
The executable program runs as in cwd with env: a program with a
/ against cwd, else the first file of that name on PATH (relative
PATH entries against cwd too) — canonicalised; None when there is
none. A file without an execute bit is skipped, as execvp skips it:
the executable named is the one that runs. What a command’s approval
names, and what it is checked against again when it runs.