Catch CalledProcessError which can happen if Bash from the Linux subsystem for Windows (WSL) is on the Path.

This commit is contained in:
Morten Enemark Lund 2016-06-10 14:15:07 +02:00
parent 7086c315af
commit 08b38afcd2

View file

@ -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
#