Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/app/CliTools/Console/Command/Sync/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
abstract class AbstractCommand extends \CliTools\Console\Command\AbstractCommand
{

const CONFIG_FILE = 'clisync.yml';
const GLOBAL_KEY = 'GLOBAL';
const CONFIG_FILE = 'clisync.yml';
const GLOBAL_KEY = 'GLOBAL';
const CONFIG_ENVKEY = 'SYNC_CONFIG';

/**
* Config area
Expand Down Expand Up @@ -187,6 +188,12 @@ protected function findConfigurationInPath()
'.' . self::CONFIG_FILE,
);

if (getenv(self::CONFIG_ENVKEY) !== FALSE) {
array_unshift($confFileList, getenv(self::CONFIG_ENVKEY));
array_unshift($confFileList, getenv(self::CONFIG_ENVKEY) . DIRECTORY_SEPARATOR . self::CONFIG_FILE);
array_unshift($confFileList, getenv(self::CONFIG_ENVKEY) . DIRECTORY_SEPARATOR . '.' . self::CONFIG_FILE);
}

// Find configuration file
$this->confFilePath = UnixUtility::findFileInDirectortyTree($confFileList);
if (empty($this->confFilePath)) {
Expand Down