From 1ce6afaaeb5da92a37112f51e29bded3e62adf19 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 3 Jun 2016 10:55:50 +0930 Subject: [PATCH] Add option to write the config file to a different path --- src/Install/Console/InstallCommand.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Install/Console/InstallCommand.php b/src/Install/Console/InstallCommand.php index fa9e73357..3551be9af 100644 --- a/src/Install/Console/InstallCommand.php +++ b/src/Install/Console/InstallCommand.php @@ -69,6 +69,12 @@ class InstallCommand extends AbstractCommand 'f', InputOption::VALUE_REQUIRED, 'Use external configuration file in YAML format' + ) + ->addOption( + 'config', + 'c', + InputOption::VALUE_REQUIRED, + 'Set the path to write the config file to' ); } @@ -187,7 +193,7 @@ class InstallCommand extends AbstractCommand $dbConfig = $this->dbConfig; $config = [ - 'debug' => true, + 'debug' => false, 'database' => [ 'driver' => $dbConfig['driver'], 'host' => $dbConfig['host'], @@ -364,7 +370,7 @@ class InstallCommand extends AbstractCommand protected function getConfigFile() { - return base_path('config.php'); + return $this->input->getOption('config') ?: base_path('config.php'); } /**