Skip to content

Commit

Permalink
Update getenv to Environment::getEnv for SilverStripe 4
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Jun 27, 2018
1 parent a50389e commit e7e811e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Extensions/ComposerLoaderExtension.php
Expand Up @@ -10,6 +10,7 @@
use Composer\Repository\BaseRepository;
use Composer\Repository\CompositeRepository;
use Composer\Repository\RepositoryInterface;
use SilverStripe\Core\Environment;
use SilverStripe\Core\Extension;

class ComposerLoaderExtension extends Extension
Expand Down Expand Up @@ -110,7 +111,7 @@ protected function getInstalledConstraint(BaseRepository $repository, $packageNa
public function onAfterBuild()
{
// Mock COMPOSER_HOME if it's not defined already. Composer requires one of the two to be set.
if (!getenv('HOME') && !getenv('COMPOSER_HOME')) {
if (!Environment::getEnv('HOME') && !Environment::getEnv('COMPOSER_HOME')) {
putenv('COMPOSER_HOME=/tmp');
}

Expand Down

0 comments on commit e7e811e

Please sign in to comment.