diff --git a/src/app/CliTools/Console/Command/Sync/AbstractCommand.php b/src/app/CliTools/Console/Command/Sync/AbstractCommand.php index 979707b..7b0365d 100644 --- a/src/app/CliTools/Console/Command/Sync/AbstractCommand.php +++ b/src/app/CliTools/Console/Command/Sync/AbstractCommand.php @@ -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 @@ -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)) {