Fix checks in bootstrap.php for missing files, fixes #166, fixes #167, closes #168

This commit is contained in:
Dan Cryer 2013-10-15 14:14:52 +01:00
parent cc86e85adb
commit 1e51e51596

View file

@ -27,17 +27,14 @@ $autoload = function ($class) {
spl_autoload_register($autoload, true, true);
if (!file_exists(dirname(__FILE__) . '/PHPCI/config.yml') && (!defined('PHPCI_IS_CONSOLE') || !PHPCI_IS_CONSOLE)) {
header('Location: install.php');
die;
}
if (!file_exists(dirname(__FILE__) . '/PHPCI/config.yml')) {
if (defined('PHPCI_IS_CONSOLE') && PHPCI_IS_CONSOLE) {
file_put_contents('php://stderr', 'Please install PHPCI with "composer install" before using console');
exit(1);
} else {
header('Location: install.php');
die;
}
if (!file_exists(dirname(__FILE__) . '/vendor/autoload.php') && defined('PHPCI_IS_CONSOLE') && PHPCI_IS_CONSOLE) {
file_put_contents('php://stderr', 'Please install PHPCI with "composer install" before using console');
exit(1);
}