Skip to content

Commit 7d04a0f

Browse files
committed
Fixes loading environment variables
1 parent 227b0fb commit 7d04a0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/Bootstrap/LoadEnvironmentVariables.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ final class LoadEnvironmentVariables implements BoostrapperContract
3131
public function bootstrap(Application $app): void
3232
{
3333
if (class_exists(Dotenv::class)) {
34-
$app->make(BaseLoadEnvironmentVariables::class)->bootstrap($app);
34+
35+
if (file_exists($app->environmentFilePath())) {
36+
$app->make(BaseLoadEnvironmentVariables::class)->bootstrap($app);
37+
}
38+
3539
$app->make(BuildLoadEnvironmentVariables::class)->bootstrap($app);
3640
}
3741
}

0 commit comments

Comments
 (0)