Skip to content

Commit

Permalink
Merge pull request #910 from kaste/fix-909
Browse files Browse the repository at this point in the history
Pass startupinfo to `subprocess.check_output`
  • Loading branch information
randy3k committed Apr 4, 2018
2 parents 83f7721 + 81edb9e commit fd6ee9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/git_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,13 @@ def git_binary_path(self):
git_path = shutil.which("git")

try:
stdout = subprocess.check_output([git_path, "--version"]).decode("utf-8")
startupinfo = None
if os.name == "nt":
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW

stdout = subprocess.check_output(
[git_path, "--version"], startupinfo=startupinfo).decode("utf-8")
except Exception:
stdout = ""
git_path = None
Expand Down

0 comments on commit fd6ee9c

Please sign in to comment.