Show More
@@ -70,8 +70,14 b' def process_handler(cmd, callback, stderr=subprocess.PIPE):' | |||
|
70 | 70 | sys.stderr.flush() |
|
71 | 71 | # On win32, close_fds can't be true when using pipes for stdin/out/err |
|
72 | 72 | close_fds = sys.platform != 'win32' |
|
73 | p = subprocess.Popen(cmd, shell=isinstance(cmd, py3compat.string_types), | |
|
74 | executable=os.environ.get('SHELL'), | |
|
73 | # Determine if cmd should be run with system shell. | |
|
74 | shell = isinstance(cmd, py3compat.string_types) | |
|
75 | # On POSIX systems run shell commands with user-preferred shell. | |
|
76 | executable = None | |
|
77 | if shell and os.name == 'posix' and 'SHELL' in os.environ: | |
|
78 | executable = os.environ['SHELL'] | |
|
79 | p = subprocess.Popen(cmd, shell=shell, | |
|
80 | executable=executable, | |
|
75 | 81 | stdin=subprocess.PIPE, |
|
76 | 82 | stdout=subprocess.PIPE, |
|
77 | 83 | stderr=stderr, |
General Comments 0
You need to be logged in to leave comments.
Login now