Skip to content

Commit

Permalink
bug #526 Fix rebooting composer on install (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.4-dev branch.

Discussion
----------

Fix rebooting composer on install

Fix #525

Commits
-------

f9e4141 Fix rebooting composer on install
  • Loading branch information
fabpot committed Jun 28, 2019
2 parents 56981bc + f9e4141 commit a388cac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function configureInstaller()
$backtrace = debug_backtrace();
foreach ($backtrace as $trace) {
if (isset($trace['object']) && $trace['object'] instanceof Installer) {
$this->installer = $trace['object'];
$this->installer = \Closure::bind(function () { return $this->update ? $this : null; }, $trace['object'], $trace['object'])();
$trace['object']->setSuggestedPackagesReporter(new SuggestedPackagesReporter(new NullIO()));
break;
}
Expand Down Expand Up @@ -315,7 +315,7 @@ public function checkForUpdate(PackageEvent $event)
}

$this->update();

$this->cacheDirPopulated = true;
$this->composer->getInstallationManager()->addInstaller(new NoopInstaller());

\Closure::bind(function () {
Expand Down

0 comments on commit a388cac

Please sign in to comment.