Force LANGUAGE=en to fix svn output parsing
TEST=Run with LANGUAGE=fr_CA, gclient still works.
Review URL: http://codereview.chromium.org/3192001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56354 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 19a39a6..1efa036 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -49,10 +49,13 @@
stderr = None
if not print_error:
stderr = subprocess.PIPE
+ env = os.environ.copy()
+ env['LANGUAGE'] = 'en'
process = subprocess.Popen(command, cwd=cwd,
shell=sys.platform.startswith('win'),
stdout=subprocess.PIPE,
- stderr=stderr)
+ stderr=stderr,
+ env=env)
std_out, std_err = process.communicate()
except OSError, e:
raise CheckCallError(command, cwd, e.errno, None)
@@ -272,13 +275,15 @@
if print_messages:
print('\n________ running \'%s\' in \'%s\''
% (' '.join(command), in_directory))
+ env = os.environ.copy()
+ env['LANGUAGE'] = 'en'
# *Sigh*: Windows needs shell=True, or else it won't search %PATH% for the
# 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,
- stderr=subprocess.STDOUT)
+ stderr=subprocess.STDOUT, env=env)
# Do a flush of sys.stdout before we begin reading from the subprocess's
# stdout.