improve error message display on missing vendor-folder

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-06-25 11:10:32 +02:00
parent bdd583d251
commit 5dfb74701c
4 changed files with 65 additions and 9 deletions

View File

@@ -15,8 +15,13 @@
* @package Install
*
*/
if(!file_exists(dirname(__DIR__) . '/vendor/autoload.php')){
die('Vendor does not exist. Please run "composer install". For more informationen https://github.com/Froxlor/Froxlor/wiki');
if (! file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
// get hint-template
$vendor_hint = file_get_contents(dirname(__DIR__) . '/templates/Sparkle/misc/vendormissinghint.tpl');
// replace values
$vendor_hint = str_replace("<FROXLOR_INSTALL_DIR>", dirname(__DIR__), $vendor_hint);
$vendor_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $vendor_hint);
die($vendor_hint);
}
require dirname(__DIR__) . '/vendor/autoload.php';
require __DIR__ . '/lib/class.FroxlorInstall.php';