diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 801410ba5..74e5e033b 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -361,8 +361,8 @@ class Shell extends Object { array_shift($argv); } + $this->OptionParser = $this->getOptionParser(); try { - $this->OptionParser = $this->getOptionParser(); list($this->params, $this->args) = $this->OptionParser->parse($argv, $command); } catch (ConsoleException $e) { $this->out($this->OptionParser->help($command));