This commit is contained in:
Morten Enemark Lund 2017-02-20 08:29:15 +01:00
parent 2ce5f5897e
commit 054f29cdd6

View file

@ -304,15 +304,15 @@ def windows_bash_command():
if bash_on_path:
try:
out = subprocess.check_output([bash_on_path, '--version'],
stderr=subprocess.PIPE,
universal_newlines=True)
stderr=subprocess.PIPE,
universal_newlines=True)
except subprocess.CalledProcessError:
bash_works = False
else:
# Check if Bash is from the "Windows Subsystem for Linux" (WSL)
# which can't be used by xonsh foreign-shell/completer
bash_works = 'pc-linux-gnu' not in out.splitlines()[0]
if bash_works:
wbc = bash_on_path
else: