Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

fresque -c wasn't working and wasn't reading the ini file location #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/Fresque.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,6 @@ public function __construct()
*/
public function callCommand($command)
{
if (($settings = $this->loadSettings($command)) === false) {
exit(1);
}

$args = $this->input->getArguments();

Expand All @@ -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']);

Expand Down Expand Up @@ -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)) {
Expand Down