Skip to content

Commit

Permalink
Fixes loading environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Aug 29, 2023
1 parent 227b0fb commit 7d04a0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Bootstrap/LoadEnvironmentVariables.php
Expand Up @@ -31,7 +31,11 @@ final class LoadEnvironmentVariables implements BoostrapperContract
public function bootstrap(Application $app): void
{
if (class_exists(Dotenv::class)) {
$app->make(BaseLoadEnvironmentVariables::class)->bootstrap($app);

if (file_exists($app->environmentFilePath())) {
$app->make(BaseLoadEnvironmentVariables::class)->bootstrap($app);
}

$app->make(BuildLoadEnvironmentVariables::class)->bootstrap($app);
}
}
Expand Down

0 comments on commit 7d04a0f

Please sign in to comment.