Make "readme" and "config" commands work again
[bdrem.git] / src / bdrem / UserInterface.php
index ea0e1421acf1772da589a0cdc0f5e05557c179f9..b0b21ccff6249a3b7b523d1a8ba398bda52e6fda 100644 (file)
@@ -45,6 +45,9 @@ abstract class UserInterface
             $res = $this->parseParameters($parser);
 
             $this->config->load();
+            setlocale(LC_TIME, $this->config->locale);
+            $this->handleCommands($res);
+
             if (!$this->config->cfgFileExists) {
                 throw new \Exception(
                     "No config file found. Looked at the following places:\n"
@@ -52,9 +55,6 @@ abstract class UserInterface
                 );
             }
 
-            setlocale(LC_TIME, $this->config->locale);
-            $this->handleCommands($res);
-
             $source = $this->config->loadSource();
             $arEvents = $source->getEvents(
                 $this->config->date,
@@ -78,7 +78,7 @@ abstract class UserInterface
     {
         $parser = new \Console_CommandLine();
         $parser->description = 'Birthday reminder';
-        $parser->version = '0.1.0';
+        $parser->version = '0.6.0';
 
         $parser->addOption(
             'daysNext',