mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
2.x Console: Display error message when unknown option is specified
This commit is contained in:
parent
fb42b15ce8
commit
65841081e9
1 changed files with 1 additions and 0 deletions
|
@ -431,6 +431,7 @@ class Shell extends CakeObject {
|
||||||
try {
|
try {
|
||||||
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->err(__d('cake_console', '<error>Error:</error> %s', $e->getMessage()));
|
||||||
$this->out($this->OptionParser->help($command));
|
$this->out($this->OptionParser->help($command));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue