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 67d1fd0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Cli/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ public function __construct($root)
$globalConfig = getenv('HOME') . '/.acquiacli/acquiacli.yml';
$projectConfig = $root . '/acquiacli.yml';

$processor->extend($loader->load($root . '/default.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($defaultConfig));
$processor->extend($loader->load($globalConfig));
$processor->extend($loader->load($projectConfig));

Expand Down

0 comments on commit 67d1fd0

Please sign in to comment.