mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Move OptionParser initialization out of try block.
This allows exceptions that result from creating the optionparser to display to the developer, making debugging easier. Fixes #3157
This commit is contained in:
parent
7135ff29fb
commit
fba17cffe9
1 changed files with 1 additions and 1 deletions
|
@ -361,8 +361,8 @@ class Shell extends Object {
|
||||||
array_shift($argv);
|
array_shift($argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->OptionParser = $this->getOptionParser();
|
||||||
try {
|
try {
|
||||||
$this->OptionParser = $this->getOptionParser();
|
|
||||||
list($this->params, $this->args) = $this->OptionParser->parse($argv, $command);
|
list($this->params, $this->args) = $this->OptionParser->parse($argv, $command);
|
||||||
} catch (ConsoleException $e) {
|
} catch (ConsoleException $e) {
|
||||||
$this->out($this->OptionParser->help($command));
|
$this->out($this->OptionParser->help($command));
|
||||||
|
|
Loading…
Add table
Reference in a new issue