Skip to content

Commit c5f09a2

Browse files
bug #870 Honor --no-scripts (nicolas-grekas)
This PR was merged into the 1.x branch. Discussion ---------- Honor --no-scripts Fix #860 Commits ------- 7d59bcd Honor --no-scripts
2 parents ed1626b + 7d59bcd commit c5f09a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Flex.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,10 @@ private function unpack(Event $event)
986986
private function reinstall(Event $event, bool $update)
987987
{
988988
$event->stopPropagation();
989-
$composer = Factory::create($this->io);
989+
990+
$ed = $composer->getEventDispatcher();
991+
$disableScripts = !method_exists($ed, 'setRunScripts') || !((array) $ed)["\0*\0runScripts"];
992+
$composer = Factory::create($this->io, null, false, $disableScripts);
990993

991994
$installer = clone $this->installer;
992995
$installer->__construct(

0 commit comments

Comments
 (0)