mirror of
https://github.com/flarum/framework.git
synced 2025-06-13 13:39:51 +08:00
Add option to write the config file to a different path
This commit is contained in:
@ -69,6 +69,12 @@ class InstallCommand extends AbstractCommand
|
|||||||
'f',
|
'f',
|
||||||
InputOption::VALUE_REQUIRED,
|
InputOption::VALUE_REQUIRED,
|
||||||
'Use external configuration file in YAML format'
|
'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;
|
$dbConfig = $this->dbConfig;
|
||||||
|
|
||||||
$config = [
|
$config = [
|
||||||
'debug' => true,
|
'debug' => false,
|
||||||
'database' => [
|
'database' => [
|
||||||
'driver' => $dbConfig['driver'],
|
'driver' => $dbConfig['driver'],
|
||||||
'host' => $dbConfig['host'],
|
'host' => $dbConfig['host'],
|
||||||
@ -364,7 +370,7 @@ class InstallCommand extends AbstractCommand
|
|||||||
|
|
||||||
protected function getConfigFile()
|
protected function getConfigFile()
|
||||||
{
|
{
|
||||||
return base_path('config.php');
|
return $this->input->getOption('config') ?: base_path('config.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user