Skip to content

Commit

Permalink
[console] Add debug option. (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Jan 8, 2017
1 parent 8adb02b commit 4bc30ba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"require": {
"php": "^5.5.9 || ^7.0",
"drupal/console-en" : "1.0.0-rc14",
"drupal/console-en" : "dev-master",
"dflydev/dot-access-configuration": "dev-master",
"stecman/symfony-console-completion": "~0.7",
"symfony/console": ">=2.7 <3.2",
Expand Down
13 changes: 7 additions & 6 deletions composer.lock

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

10 changes: 8 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ public function doRun(InputInterface $input, OutputInterface $output)
);
}

if ($this->getCommandName($input) == 'list' && $this->container->hasParameter('console.warning')) {
$io->warning(
$this->trans($this->container->getParameter('console.warning'))
);
}

return $code;
}

Expand Down Expand Up @@ -204,10 +210,10 @@ private function addOptions()
);
$this->getDefinition()->addOption(
new InputOption(
'--no-debug',
'--debug',
null,
InputOption::VALUE_NONE,
$this->trans('application.options.no-debug')
$this->trans('application.options.debug')
)
);
$this->getDefinition()->addOption(
Expand Down

0 comments on commit 4bc30ba

Please sign in to comment.