mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Remove environment variable
This commit is contained in:
parent
2ef8358771
commit
e605eb3885
|
|
@ -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 <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setEnv(string $key, string $value)
|
||||
{
|
||||
$this->envOptions[$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count files in repository.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user