pub fn resolve(program: &OsStr, cwd: &Path) -> Result<PathBuf>
Resolve against the inherited PATH and, on Windows, PATHEXT. A bare name never implicitly searches the working directory; relative PATH entries are based on cwd.
cwd