Dan Liew 74771a338c [lit] Fix bug where `lit.util.which()` would return a directory
instead of executable if the argument was found inside a directory
contained in PATH.

An example where this could cause a problem is if there was a RUN line
that ran the ``test`` command and if the user had a directory in their
PATH that contained a directory called ``test/`` (that occured before
``/usr/bin/``). Lit would try to use the directory as the executable
which would fail with the rather cryptic message.

```
Could not create process due to [Errno 13] Permission denied
```

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253031 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 11:37:25 +00:00
..
2014-03-29 10:18:08 +00:00
2015-09-10 13:44:28 +00:00
2014-06-08 22:29:17 +00:00
2015-11-13 01:44:32 +00:00
2015-09-29 22:09:16 +00:00
2014-10-16 20:00:02 +00:00
2014-01-24 17:20:08 +00:00