Skip to content

Commit

Permalink
fix createConfigJson using incorrect method to trigger internal command
Browse files Browse the repository at this point in the history
  • Loading branch information
atanas-dev committed Sep 12, 2018
1 parent 3ab48ae commit 15a3693
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,14 @@ public static function createConfigJson( Event $event ) {
$input = new ArrayInput( [ 'config:create' ] );
$output = new BufferedOutput();

static::run( $input, $output );

$event->getIO()->write( $output->fetch() );
try {
$application = static::create();
$command = $application->find('config:create');
$command->run( $input, $output );
$event->getIO()->write( $output->fetch() );
} catch ( RuntimeException $e ) {
$event->getIO()->write( '<error>' . $e->getMessage() . '</error>' );
}
}

/**
Expand Down

0 comments on commit 15a3693

Please sign in to comment.