|
|
@ -170,14 +170,10 @@ class Config |
|
|
|
{ |
|
|
|
{ |
|
|
|
$environment = $this->getEnvironment(); |
|
|
|
$environment = $this->getEnvironment(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($environment)) |
|
|
|
|
|
|
|
{ |
|
|
|
$configFilePath = getcwd() . '/.mage/config/environment/' . $environment . '.yml'; |
|
|
|
$configFilePath = getcwd() . '/.mage/config/environment/' . $environment . '.yml'; |
|
|
|
|
|
|
|
|
|
|
|
$parameters = $this->getParameters(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($environment) && (!empty($parameters) || !$this->isRunInSpecialMode($parameters))) { |
|
|
|
|
|
|
|
throw new RuntimeException('Environment is not set'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
$this->environmentConfig = $this->loadEnvironment($configFilePath); |
|
|
|
$this->environmentConfig = $this->loadEnvironment($configFilePath); |
|
|
|
} catch (ConfigNotFoundException $e) { |
|
|
|
} catch (ConfigNotFoundException $e) { |
|
|
@ -185,6 +181,7 @@ class Config |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
* |
|
|
|