Skip to content

Commit

Permalink
Merge pull request consolidation#449 from consolidation-org/display-e…
Browse files Browse the repository at this point in the history
…rror

Define an error-displaying function
  • Loading branch information
greg-1-anderson authored Sep 13, 2016
2 parents 52db42e + 2204961 commit a69c650
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 59 deletions.
117 changes: 59 additions & 58 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/Robo.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,16 @@ public static function configureContainer(ContainerInterface $container, Config
$container->share('formatterManager', \Consolidation\OutputFormatters\FormatterManager::class);
$container->share('commandProcessor', \Consolidation\AnnotatedCommand\CommandProcessor::class)
->withArgument('hookManager')
->withMethodCall('setFormatterManager', ['formatterManager']);
->withMethodCall('setFormatterManager', ['formatterManager'])
->withMethodCall(
'setDisplayErrorFunction',
[
function ($output, $message) use ($container) {
$logger = $container->get('logger');
$logger->error($message);
}
]
);
$container->share('commandFactory', \Consolidation\AnnotatedCommand\AnnotatedCommandFactory::class)
->withMethodCall('setCommandProcessor', ['commandProcessor']);
$container->add('collection', \Robo\Collection\Collection::class);
Expand Down

0 comments on commit a69c650

Please sign in to comment.