mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 17:30:59 +01:00
avoid test failure in execer.py:137 if cwd not on c: drive (in windows)
This commit is contained in:
parent
e0fe044859
commit
d664e86c89
3 changed files with 5 additions and 1 deletions
BIN
xonsh/__pycache__/parser_table.cpython-35.pyc.2100502378056
Normal file
BIN
xonsh/__pycache__/parser_table.cpython-35.pyc.2100502378056
Normal file
Binary file not shown.
BIN
xonsh/__pycache__/parser_table.cpython-35.pyc.2390169633296
Normal file
BIN
xonsh/__pycache__/parser_table.cpython-35.pyc.2390169633296
Normal file
Binary file not shown.
|
@ -133,7 +133,11 @@ class CommandsCache(abc.Mapping):
|
|||
if os.path.isfile(full_name)
|
||||
), None)
|
||||
if local_bin:
|
||||
return os.path.abspath(os.path.relpath(local_bin, cwd))
|
||||
if os.path.splitdrive(cwd)[0] != os.path.splitdrive( local_bin)[0]: # cwd not on same drive as bin
|
||||
return os.path.abspath( local_bin) # avoid ValueError from relpath()
|
||||
else:
|
||||
return os.path.abspath(os.path.relpath(local_bin, cwd))
|
||||
|
||||
|
||||
cached = next((cmd for cmd in possibilities if cmd in self._cmds_cache), None)
|
||||
if cached:
|
||||
|
|
Loading…
Add table
Reference in a new issue