From 1e51e51596e01923583c22e25e5c47035074f4fd Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Tue, 15 Oct 2013 14:14:52 +0100 Subject: [PATCH] Fix checks in bootstrap.php for missing files, fixes #166, fixes #167, closes #168 --- bootstrap.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index b84f6428..17aaf608 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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); }