Skip to content

Commit

Permalink
Merge branch '2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ScopeyNZ committed Nov 7, 2018
2 parents 30b0692 + 31c5088 commit f237f7f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Extensions/ComposerLoaderExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ 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 (!Environment::getEnv('HOME') && !Environment::getEnv('COMPOSER_HOME')) {
putenv('COMPOSER_HOME=/tmp');
if (!Environment::getEnv('COMPOSER_HOME')) {
$home = Environment::getEnv('HOME');
if (!$home || !is_dir($home) || !is_writable($home)) {
// Set our own directory
putenv('COMPOSER_HOME=' . sys_get_temp_dir());
}
}

$originalDir = getcwd();
Expand Down

0 comments on commit f237f7f

Please sign in to comment.