Skip to content

Commit 88732b6

Browse files
committed
fix(cmd): don't try to use TASKKILL on linux
Fixes #576
1 parent fdc8ecb commit 88732b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: git/cmd.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,15 @@ def __del__(self):
254254
proc.terminate()
255255
proc.wait() # ensure process goes away
256256
except OSError as ex:
257-
log.info("Ignored error after process has dies: %r", ex)
257+
log.info("Ignored error after process had died: %r", ex)
258258
pass # ignore error when process already died
259259
except AttributeError:
260260
# try windows
261261
# for some reason, providing None for stdout/stderr still prints something. This is why
262262
# we simply use the shell and redirect to nul. Its slower than CreateProcess, question
263263
# is whether we really want to see all these messages. Its annoying no matter what.
264-
call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True)
264+
if is_win:
265+
call(("TASKKILL /F /T /PID %s 2>nul 1>nul" % str(proc.pid)), shell=True)
265266
# END exception handling
266267

267268
def __getattr__(self, attr):

0 commit comments

Comments
 (0)