From 79490f662e0862b9a1bb3a9f1d2ac7ff17825bd5 Mon Sep 17 00:00:00 2001 From: Frederik Bosch Date: Sat, 28 Mar 2015 20:48:19 +0100 Subject: [PATCH] Revert #3813, implement differently Fix #3830 --- src/Composer/Util/Git.php | 5 +++++ src/Composer/Util/ProcessExecutor.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 34b686d9a..4888c17bd 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -177,6 +177,11 @@ class Git unset($_SERVER['GIT_WORK_TREE']); } + // Run processes with predictable LANGUAGE + if (getenv('LANGUAGE') !== 'C') { + putenv('LANGUAGE=C'); + } + // clean up env for OSX, see https://github.com/composer/composer/issues/2146#issuecomment-35478940 putenv("DYLD_LIBRARY_PATH"); unset($_SERVER['DYLD_LIBRARY_PATH']); diff --git a/src/Composer/Util/ProcessExecutor.php b/src/Composer/Util/ProcessExecutor.php index e7cfa3dcc..38f5bba00 100644 --- a/src/Composer/Util/ProcessExecutor.php +++ b/src/Composer/Util/ProcessExecutor.php @@ -56,7 +56,7 @@ class ProcessExecutor $this->captureOutput = count(func_get_args()) > 1; $this->errorOutput = null; - $process = new Process($command, $cwd, array_replace($_ENV, $_SERVER, array('LANGUAGE' => 'C')), null, static::getTimeout()); + $process = new Process($command, $cwd, null, null, static::getTimeout()); $callback = is_callable($output) ? $output : array($this, 'outputHandler'); $process->run($callback);