diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-31 15:45:04 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-31 15:45:54 +0400 |
commit | ca996db2954c40c1584ed65888ce427a5e9933ae (patch) | |
tree | b4892f0b1af255dd0ea6f4cad93186d58473a3e6 /core/Console.php | |
parent | b36ed775f62bca0a5f60e1b721a3d95b4763f751 (diff) |
Use OutputInterface to display no config file message instead of echo-ing.
Diffstat (limited to 'core/Console.php')
-rw-r--r-- | core/Console.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/Console.php b/core/Console.php index 28d6e4d6b6..e6d1f91397 100644 --- a/core/Console.php +++ b/core/Console.php @@ -40,7 +40,7 @@ class Console extends Application public function doRun(InputInterface $input, OutputInterface $output) { $this->initPiwikHost($input); - $this->initConfig(); + $this->initConfig($output); try { self::initPlugins(); } catch(\Exception $e) { @@ -96,14 +96,14 @@ class Console extends Application Url::setHost($piwikHostname); } - protected function initConfig() + protected function initConfig(OutputInterface $output) { $config = Config::getInstance(); try { $config->checkLocalConfigFound(); return $config; } catch (\Exception $e) { - echo ($e->getMessage() . "\n\n"); + $output->writeln($e->getMessage() . "\n"); } } |