diff --git a/gclient_utils.py b/gclient_utils.py index 913e8b13a..d21467fd7 100644 --- a/gclient_utils.py +++ b/gclient_utils.py @@ -209,7 +209,8 @@ def SubprocessCallAndFilter(command, # executable, but shell=True makes subprocess on Linux fail when it's called # with a list because it only tries to execute the first item in the list. kid = subprocess.Popen(command, bufsize=0, cwd=in_directory, - shell=(sys.platform == 'win32'), stdout=subprocess.PIPE) + shell=(sys.platform == 'win32'), stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) # Also, we need to forward stdout to prevent weird re-ordering of output. # This has to be done on a per byte basis to make sure it is not buffered: diff --git a/tests/gclient_test.py b/tests/gclient_test.py index 6638de4e9..c04bd6302 100644 --- a/tests/gclient_test.py +++ b/tests/gclient_test.py @@ -1071,7 +1071,8 @@ class SubprocessCallAndFilterTestCase(BaseTestCase): gclient.sys.stdout.write(i) gclient_utils.subprocess.Popen(command, bufsize=0, cwd=in_directory, shell=(gclient.sys.platform == 'win32'), - stdout=gclient_utils.subprocess.PIPE).AndReturn(kid) + stdout=gclient_utils.subprocess.PIPE, + stderr=gclient_utils.subprocess.STDOUT).AndReturn(kid) self.mox.ReplayAll() compiled_pattern = re.compile(pattern) line_list = []