Pārlūkot izejas kodu

When using composer commands outside a Composer\Console\Application, one does not have an IOInterface object

Paul Seiffert 13 gadi atpakaļ
vecāks
revīzija
e4a0de5df4
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      src/Composer/Command/Command.php

+ 2 - 0
src/Composer/Command/Command.php

@@ -67,6 +67,8 @@ abstract class Command extends BaseCommand
             if ($application instanceof ComposerApplication) {
                 /* @var $application    ComposerApplication */
                 $this->io = $application->getIO();
+            } else {
+                $this->io = new \Composer\IO\NullIO();
             }
         }
         return $this->io;