pub fn resolve_with(
program: &OsStr,
cwd: &Path,
variable: impl Fn(&str) -> Option<OsString>,
) -> Result<PathBuf>Expand description
Resolve using the environment that the child will receive, not the caller’s PATH:
variable reads one variable of that environment.