diff --git a/lib/Fresque.php b/lib/Fresque.php index 06b5558..3baf892 100644 --- a/lib/Fresque.php +++ b/lib/Fresque.php @@ -330,9 +330,6 @@ public function __construct() */ public function callCommand($command) { - if (($settings = $this->loadSettings($command)) === false) { - exit(1); - } $args = $this->input->getArguments(); @@ -343,7 +340,7 @@ public function callCommand($command) if ($command === null || !array_key_exists($command, $this->commandTree)) { $this->help($command); } else { - if ($this->input->getOption('help')->value === true) { + if ($this->input->getOption('help')->value === true or $command == 'help' ) { $this->output->outputLine(); $this->output->outputLine($this->commandTree[$command]['help']); @@ -378,6 +375,9 @@ public function callCommand($command) $arg = $name; } } + if (($settings = $this->loadSettings($command)) === false) { + exit(1); + } $unrecognized = array_diff(array_keys($this->input->getOptionValues()), array_values($allowed)); if (!empty($unrecognized)) {