Skip to content

A free open source IT asset/license management system

Check to make sure there's a .env file

Jeremy Price2ee8639eaf69
diff --git a/upgrade.php b/upgrade.php
index 1da44c90b9..7f98211143 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -55,6 +55,12 @@ echo "--------------------------------------------------------\n\n";
// Check the .env looks ok
$env = file('.env');
+if (! $env){
+ echo "\n!!!!!!!!!!!!!!!!!!!!!!!!!! .ENV FILE ERROR !!!!!!!!!!!!!!!!!!!!!!!!!!\n";
+ echo "Your .env file doesn't seem to exist in this directory or isn't readable! Please look into that.\n";
+ exit(1);
+}
+
$env_good = '';
$env_bad = '';