Fix putenv to avoid leaving the environment in a dirty state
parent
94dce37424
commit
fb93036a70
|
@ -288,7 +288,7 @@ class EventDispatcherTest extends TestCase
|
||||||
rmdir(__DIR__ . sprintf('%svendor', DIRECTORY_SEPARATOR));
|
rmdir(__DIR__ . sprintf('%svendor', DIRECTORY_SEPARATOR));
|
||||||
|
|
||||||
chdir($currentDirectoryBkp);
|
chdir($currentDirectoryBkp);
|
||||||
putenv('COMPOSER_BIN_DIR=' . $composerBinDirBkp);
|
putenv('COMPOSER_BIN_DIR' . ($composerBinDirBkp === false ? '' : '=' . $composerBinDirBkp));
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function createsVendorBinFolderChecksEnvDoesNotContainsBin()
|
static public function createsVendorBinFolderChecksEnvDoesNotContainsBin()
|
||||||
|
@ -296,7 +296,7 @@ class EventDispatcherTest extends TestCase
|
||||||
mkdir(__DIR__ . sprintf('%svendor%sbin', DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), 0700, true);
|
mkdir(__DIR__ . sprintf('%svendor%sbin', DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), 0700, true);
|
||||||
$val = getenv('PATH');
|
$val = getenv('PATH');
|
||||||
|
|
||||||
if ( ! $val ) {
|
if (!$val) {
|
||||||
$val = getenv('Path');
|
$val = getenv('Path');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ class EventDispatcherTest extends TestCase
|
||||||
{
|
{
|
||||||
$val = getenv('PATH');
|
$val = getenv('PATH');
|
||||||
|
|
||||||
if ( ! $val ) {
|
if (!$val) {
|
||||||
$val = getenv('Path');
|
$val = getenv('Path');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue