public function getConfigurationOverride($override_file)
{
// When running through `daux --serve` we set an environment variable to know where we started from
$env = getenv('DAUX_CONFIGURATION');
if ($env && file_exists($env)) {
return $env;
}
if ($override_file == null) {
return null;
}
if (file_exists($override_file)) {
if (DauxHelper::isAbsolutePath($override_file)) {
return $override_file;
}
return getcwd() . '/' . $override_file;
}
$newPath = $this->local_base . DIRECTORY_SEPARATOR . $override_file;
if (file_exists($newPath)) {
return $newPath;
}
throw new Exception('The configuration override file does not exist. Check the path again : ' . $override_file);
}