Skip to content

Commit a883a28

Browse files
committed
Avoid errors with an older global install of Flex
1 parent 49059a1 commit a883a28

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Flex.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,12 @@ function ($value) {
544544
}
545545
}
546546

547-
foreach ($postInstallRecipes as $recipe) {
548-
$this->configurator->postInstall($recipe, $this->lock, [
549-
'force' => $event instanceof UpdateEvent && $event->force(),
550-
]);
547+
if (method_exists($this->configurator, 'postInstall')) {
548+
foreach ($postInstallRecipes as $recipe) {
549+
$this->configurator->postInstall($recipe, $this->lock, [
550+
'force' => $event instanceof UpdateEvent && $event->force(),
551+
]);
552+
}
551553
}
552554

553555
if (null !== $manifest) {

0 commit comments

Comments
 (0)