summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2017-11-16 18:34:05 (GMT)
committerJon Pugh2017-11-16 18:34:05 (GMT)
commit79b724c8a972d62973bdf6c3b6fa65b4d3779ec7 (patch)
treea2d53a7ecbb1671de813266e82b253a481d9b1c4
parent013164652992076c134844e0bd826abb9637c348 (diff)
Load up our \Aegir\Provision\Console\Config() class so it's fully validated, then pipe to this.
-rw-r--r--src/Provision.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Provision.php b/src/Provision.php
index d8447f0..939bf2d 100644
--- a/src/Provision.php
+++ b/src/Provision.php
@@ -6,6 +6,7 @@ namespace Aegir\Provision;
use Aegir\Provision\Commands\ExampleCommands;
use Aegir\Provision\Console\Config as ConsoleConfig;
+use Consolidation\Config\Loader\ConfigProcessor;
use Robo\Common\ConfigAwareTrait;
use Robo\Config\Config;
use Robo\Robo;
@@ -29,17 +30,17 @@ class Provision {
OutputInterface $output = NULL
) {
- // Create Robo configuration.
- $config = Robo::createConfiguration([ConsoleConfig::getHomeDir() . DIRECTORY_SEPARATOR . ConsoleConfig::CONFIG_FILENAME]);
- $config->setDefault('aegir_root', ConsoleConfig::getHomeDir());
- $config->setDefault('script_user', ConsoleConfig::getScriptUser());
- $config->setDefault('config_path', ConsoleConfig::getHomeDir() . '/config');
+ // Prepare Console configuration and import it into Robo config.
+ $consoleConfig = new \Aegir\Provision\Console\Config();
+
+ $config = new Config();
+ $config->import($consoleConfig->all());
$this->setConfig($config);
// Create Application.
$application = new \Aegir\Provision\Application(self::APPLICATION_NAME, $config->get('version'));
- $application->setConfig(new \Aegir\Provision\Console\Config());
+ $application->setConfig($consoleConfig);
// Create and configure container.
$container = Robo::createDefaultContainer($input, $output, $application, $config);