Fixing bootstrap

This commit is contained in:
Dan Cryer 2014-12-08 15:09:57 +00:00
parent c89d289408
commit a4e6134fde

View file

@ -19,9 +19,21 @@ $conf['b8']['app']['namespace'] = 'PHPCI';
$conf['b8']['app']['default_controller'] = 'Home';
$conf['b8']['view']['path'] = dirname(__DIR__) . '/PHPCI/View/';
if (file_exists(dirname(__DIR__) . '/PHPCI/config.yml')) {
// If the PHPCI config file is not where we expect it, try looking in
// env for an alternative config path.
$configFile = dirname(__FILE__) . '/PHPCI/config.yml';
if (!file_exists($configFile)) {
$configEnv = getenv('phpci_config_file');
if (!empty($configEnv)) {
$configFile = $configEnv;
}
}
if (file_exists($configFile)) {
$config = new b8\Config($conf);
$config->loadYaml(dirname(__DIR__) . '/PHPCI/config.yml');
$config->loadYaml($configFile);
}
require_once(dirname(__DIR__) . '/vars.php');