Skip to content

Commit

Permalink
Init now can show used config file when fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Nov 8, 2023
1 parent ef3b983 commit 6256cb4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Ease/Shared.php
Expand Up @@ -87,8 +87,13 @@ public static function init($configKeys = [], $envFile = '', $exit = true)
$configured = false;
}
}
if ($exit && ($configured === false)) {
exit(1);
if ($configured === false) {
if ($envFile) {
fwrite(fopen('php://stderr', 'wb'), self::appName() . ': (using ' . $envFile . ')' . PHP_EOL);
}
if ($exit) {
exit(1);
}
}
return $configured;
}
Expand Down

0 comments on commit 6256cb4

Please sign in to comment.