diff options
author | Dan Gohman <gohman@apple.com> | 2010-10-28 20:34:33 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-10-28 20:34:33 +0000 |
commit | 24a492683ca02f234d727740f03c1fb2949f2b44 (patch) | |
tree | eb920f1dc7ae21df1872bace23efd7b0876a7c33 /lib/System/Unix/Program.inc | |
parent | 8f6a281e979df1578526fc8a72a3c1bd33aa3efa (diff) |
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.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/Program.inc')
-rw-r--r-- | lib/System/Unix/Program.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index 3741bf8e6b..110a6d14f4 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -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 |