Skip to content

Commit 57ccee5

Browse files
Fix fatal error when executing a command that does not have the no-progress option.
1 parent e424668 commit 57ccee5

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
@@ -80,7 +80,12 @@ protected function getCorePackage($operation) {
8080
* @param \Composer\Plugin\CommandEvent $event
8181
*/
8282
public function onCmdBeginsEvent(\Composer\Plugin\CommandEvent $event) {
83-
$this->progress = !($event->getInput()->getOption('no-progress'));
83+
if ($event->getInput()->hasOption('no-progress')) {
84+
$this->progress = !($event->getInput()->getOption('no-progress'));
85+
}
86+
else {
87+
$this->progress = TRUE;
88+
}
8489
}
8590

8691
/**

0 commit comments

Comments
 (0)