def run(self):
        try:
            # Ignore directories that no longer exist
            if not os.path.isdir(self.working_dir):
                return

            if self.working_dir != "":
                os.chdir(self.working_dir)

            # Windows needs startupinfo in order to start process in background
            startupinfo = None
            if os.name == 'nt':
                startupinfo = subprocess.STARTUPINFO()
                startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW

            # universal_newlines seems to break `log` in python3
            proc = subprocess.Popen(self.command,
                stdout=self.stdout, stderr=subprocess.STDOUT,
                stdin=subprocess.PIPE, startupinfo=startupinfo,
                shell=False, universal_newlines=False)
            output = proc.communicate(self.stdin)[0]
            if not output:
                output = ''

            main_thread(self.on_done,
                _make_text_safeish(output, self.fallback_encoding), **self.kwargs)
        except subprocess.CalledProcessError as e:
            main_thread(self.on_done, e.returncode)
        except OSError as e:
            if e.errno == 2:
                main_thread(sublime.error_message, "Git binary could not be found in PATH\n\nConsider using the git_command setting for the Git plugin\n\nPATH is: %s" % os.environ['PATH'])
            else:
                raise e
dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/sublime-github/lib/git.py/CommandThread.run/original