mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Catch CalledProcessError which can happen if Bash from the Linux subsystem for Windows (WSL) is on the Path.
This commit is contained in:
parent
7086c315af
commit
08b38afcd2
1 changed files with 1 additions and 2 deletions
|
@ -205,13 +205,12 @@ if ON_WINDOWS:
|
|||
subprocess.check_call([WINDOWS_BASH_COMMAND, '--version'],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, CalledProcessError):
|
||||
if GIT_FOR_WINDOWS_PATH:
|
||||
bashcmd = os.path.join(GIT_FOR_WINDOWS_PATH, 'bin\\bash.exe')
|
||||
if os.path.isfile(bashcmd):
|
||||
WINDOWS_BASH_COMMAND = bashcmd
|
||||
|
||||
|
||||
#
|
||||
# Bash completions defaults
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue