From e52895d4481cddfff9b96665094d2a728352791d Mon Sep 17 00:00:00 2001 From: David Lynch Date: Wed, 20 Jan 2016 21:09:56 -0600 Subject: [PATCH] Remove a repeated check for platform --- git/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/git/__init__.py b/git/__init__.py index 84c16ad0..c64c76d5 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -4,6 +4,7 @@ import re import sublime import sublime_plugin +import sys import threading import subprocess import functools @@ -188,13 +189,13 @@ def run(self): startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + env = os.environ.copy() + shell = False if sublime.platform() == 'windows': shell = True - - env = os.environ.copy() - if sublime.platform() == 'windows' and 'HOME' not in env: - env['HOME'] = env['USERPROFILE'] + if 'HOME' not in env: + env['HOME'] = env['USERPROFILE'] # universal_newlines seems to break `log` in python3 proc = subprocess.Popen(self.command,