Skip to content

Commit

Permalink
Alters default config location to allow for incorporation from global…
Browse files Browse the repository at this point in the history
… require.
  • Loading branch information
typhonius committed Mar 26, 2020
1 parent 802a214 commit d9d8280
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Cli/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ public function __construct($root)
$loader = new YamlConfigLoader();
$processor = new ConfigProcessor();

$globalConfig = getenv('HOME') . '/.acquiacli/acquiacli.yml';
$projectConfig = $root . '/acquiacli.yml';
$homeDir = getenv('HOME');
$defaultConfig = join(DIRECTORY_SEPARATOR, [dirname(dirname(__DIR__)), 'default.acquiacli.yml']);
$globalConfig = join(DIRECTORY_SEPARATOR, [$homeDir, '.acquiacli', 'acquiacli.yml']);
$projectConfig = join(DIRECTORY_SEPARATOR, [$root, 'acquiacli.yml']);

$processor->extend($loader->load($root . '/default.acquiacli.yml'));
$processor->extend($loader->load($defaultConfig));
$processor->extend($loader->load($globalConfig));
$processor->extend($loader->load($projectConfig));

Expand Down

0 comments on commit d9d8280

Please sign in to comment.