New error detection: composer has not been installed

This commit is contained in:
Jérôme Schneider 2013-07-11 21:41:03 +02:00
parent 7b556f1e12
commit 124c339d5b
6 changed files with 31 additions and 6 deletions

View file

@ -35,7 +35,11 @@ if(file_exists(getcwd() . "/Core")) {
define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../
}
require PROJECT_PATH_ROOT . '/vendor/autoload.php';
if(!file_exists(PROJECT_PATH_ROOT . 'vendor/')) {
die('<h1>Incomplete installation</h1><p>Ba&iuml;kal dependancies have not been installed. Please, execute "<strong>composer install</strong>" in the folder where you installed Ba&iuml;kal.');
}
require PROJECT_PATH_ROOT . 'vendor/autoload.php';
# Bootstraping Flake
\Flake\Framework::bootstrap();

View file

@ -35,7 +35,11 @@ if(file_exists(getcwd() . "/Core")) {
define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../
}
require PROJECT_PATH_ROOT . '/vendor/autoload.php';
if(!file_exists(PROJECT_PATH_ROOT . 'vendor/')) {
die('<h1>Incomplete installation</h1><p>Ba&iuml;kal dependancies have not been installed. Please, execute "<strong>composer install</strong>" in the folder where you installed Ba&iuml;kal.');
}
require PROJECT_PATH_ROOT . 'vendor/autoload.php';
# Bootstraping Flake
\Flake\Framework::bootstrap();

View file

@ -34,7 +34,11 @@ if(file_exists(getcwd() . "/Core")) {
define("PROJECT_PATH_ROOT", dirname(getcwd()) . "/"); #../
}
require PROJECT_PATH_ROOT . '/vendor/autoload.php';
if(!file_exists(PROJECT_PATH_ROOT . 'vendor/')) {
die('<h1>Incomplete installation</h1><p>Ba&iuml;kal dependancies have not been installed. Please, execute "<strong>composer install</strong>" in the folder where you installed Ba&iuml;kal.');
}
require PROJECT_PATH_ROOT . 'vendor/autoload.php';
# Bootstraping Flake
\Flake\Framework::bootstrap();

View file

@ -34,8 +34,12 @@ class Initialize extends \Flake\Core\Controller {
public function execute() {
# Assert that /Specific is writable
if(!file_exists(PROJECT_PATH_SPECIFIC) || !is_dir(PROJECT_PATH_SPECIFIC) || !is_writable(PROJECT_PATH_SPECIFIC)) {
throw new \Exception("Specific/ dir is readonly. Baïkal Admin requires write permissions on this dir.");
$message = "<h1>Error - Insufficient permissions on the <span style='background-color: yellow;'>Specific/</span> folder</h1><p>";
$message .= "<p>In order to work properly, Baïkal needs to have write permissions in the <strong>Specific/</strong> folder.</p>";
die($message);
}
$this->createHtaccessFilesIfNeeded();

View file

@ -39,7 +39,11 @@ if(file_exists(dirname(getcwd()). "/Core")) {
define("PROJECT_PATH_ROOT", dirname(dirname(getcwd())) . "/"); #../../
}
require PROJECT_PATH_ROOT . '/vendor/autoload.php';
if(!file_exists(PROJECT_PATH_ROOT . 'vendor/')) {
die('<h1>Incomplete installation</h1><p>Ba&iuml;kal dependancies have not been installed. Please, execute "<strong>composer install</strong>" in the folder where you installed Ba&iuml;kal.');
}
require PROJECT_PATH_ROOT . 'vendor/autoload.php';
# Bootstraping Flake
\Flake\Framework::bootstrap();

View file

@ -39,8 +39,13 @@ if(file_exists(dirname(dirname(getcwd())) . "/Core")) {
define("PROJECT_PATH_ROOT", dirname(dirname(dirname(getcwd()))) . "/"); # ../../../
}
# Bootstraping Flake
if(!file_exists(PROJECT_PATH_ROOT . 'vendor/')) {
die('<h1>Incomplete installation</h1><p>Ba&iuml;kal dependancies have not been installed. Please, execute "<strong>composer install</strong>" in the folder where you installed Ba&iuml;kal.');
}
require PROJECT_PATH_ROOT . "vendor/autoload.php";
# Bootstraping Flake
\Flake\Framework::bootstrap();
# Bootstrap BaikalAdmin