Browse Source

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

Paul Seiffert 13 years ago
parent
commit
e4a0de5df4
1 changed files with 2 additions and 0 deletions
  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;