From e605eb38858df8d82811c1afe391570c65b84e27 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 12 Nov 2016 21:40:53 +0100 Subject: [PATCH] Remove environment variable --- Utils/Git/Repository.php | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index 0a42fe7c6..03ef83baa 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -55,14 +55,6 @@ class Repository */ private $bare = false; - /** - * Env variables. - * - * @var array - * @since 1.0.0 - */ - private $envOptions = []; - /** * Current branch. * @@ -189,16 +181,7 @@ class Repository 2 => ['pipe', 'w'], ]; - if (count($_ENV) === 0) { - $env = null; - foreach ($this->envOptions as $key => $value) { - putenv(sprintf("%s=%s", $key, $value)); - } - } else { - $env = array_merge($_ENV, $this->envOptions); - } - - $resource = proc_open($cmd, $desc, $pipes, $this->path, $env); + $resource = proc_open($cmd, $desc, $pipes, $this->path, null); $stdout = stream_get_contents($pipes[1]); $stderr = stream_get_contents($pipes[2]); @@ -639,22 +622,6 @@ class Repository return file_get_contents($this->getDirectoryPath() . '/description'); } - /** - * Set environment value. - * - * @param string $key Key - * @param string $value Value - * - * @return void - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function setEnv(string $key, string $value) - { - $this->envOptions[$key] = $value; - } - /** * Count files in repository. *