Skip to content

Commit 98081af

Browse files
Fix fatal error when executing a command that does not have the no-progress option.
1 parent 93ae49a commit 98081af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Handler.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ protected function getCorePackage($operation) {
7979
* @param \Composer\Plugin\CommandEvent $event
8080
*/
8181
public function onCmdBeginsEvent(\Composer\Plugin\CommandEvent $event) {
82-
$this->progress = !($event->getInput()->getOption('no-progress'));
82+
if ($event->getInput()->hasOption('no-progress')) {
83+
$this->progress = !($event->getInput()->getOption('no-progress'));
84+
}
85+
else {
86+
$this->progress = TRUE;
87+
}
8388
}
8489

8590
/**

0 commit comments

Comments
 (0)