Skip to content

Commit

Permalink
Merge pull request #1215 from xonsh/path_tuple
Browse files Browse the repository at this point in the history
Fix locate_binary assuming path is a list
  • Loading branch information
gforsyth committed Jun 12, 2016
2 parents b25b057 + af50d8c commit 3d9e844
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions news/path_tuple.rst
@@ -0,0 +1,13 @@
**Added:** None

**Changed:** None

**Deprecated:** None

**Removed:** None

**Fixed:**

* Fixed ``xonsh.environ.locate_binary()`` to handle PATH variable are given as a tuple.

**Security:** None
2 changes: 1 addition & 1 deletion xonsh/environ.py
Expand Up @@ -819,7 +819,7 @@ def locate_binary(name):
# Windows users expect to be able to execute files in the same directory
# without `./`
if ON_WINDOWS:
directories = [_get_cwd()] + directories
directories = [_get_cwd()] + list(directories)
try:
return next(chain.from_iterable(_yield_executables(directory, name) for
directory in directories if os.path.isdir(directory)))
Expand Down

0 comments on commit 3d9e844

Please sign in to comment.