소스 검색

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

Paul Seiffert 13 년 전
부모
커밋
e4a0de5df4
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;