Skip to content

Commit 416a633

Browse files
committed
fix(other): detect missing .env file in setup_database.php before connection attempts
1 parent 8237c65 commit 416a633

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/setup_database.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
$envFile = $options['env'];
1818
}
1919

20+
if (!file_exists(APP_PATH . $envFile)) {
21+
echo "Environment file {$envFile} not found. Please create it from the example file.\n";
22+
exit(1);
23+
}
24+
2025
$environment = Hm_Environment::getInstance();
2126
$environment->load($envFile);
2227

0 commit comments

Comments
 (0)