forked from OSchip/llvm-project
Revert r117582, which reverted r77396. Searching PATH for a string
which contains slashes is inconsistent with the meaning of PATH on Unix-type platforms, and pretty surprising. If the user has given a specific path to execute and we can't execute it, we should fail and say why. (Apparently the new posix_spawn code doesn't always say why, but that's a separate issue.) llvm-svn: 117596
This commit is contained in:
parent
9f414eee8c
commit
47215f4e04
|
@ -63,7 +63,7 @@ Program::FindProgramByName(const std::string& progName) {
|
|||
return Path();
|
||||
// Use the given path verbatim if it contains any slashes; this matches
|
||||
// the behavior of sh(1) and friends.
|
||||
if (progName.find('/') != std::string::npos && temp.canExecute())
|
||||
if (progName.find('/') != std::string::npos)
|
||||
return temp;
|
||||
|
||||
// At this point, the file name does not contain slashes. Search for it
|
||||
|
|
Loading…
Reference in New Issue