Skip to content

Commit 3839041

Browse files
committed
Overloading env vars on serve
1 parent 4dfe1f2 commit 3839041

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
require $basePath . '/vendor/autoload.php';
77

88
// Laravel will not overwrite existing environment variables, so we'll pull in custom ones here
9-
$dotenv = new Dotenv\Dotenv($basePath, '.env.dredd');
10-
$dotenv->load();
9+
if (file_exists($basePath . '/.env.dredd')) {
10+
$dotenv = new Dotenv\Dotenv($basePath, '.env.dredd');
11+
$dotenv->overload();
12+
}
1113

1214
require_once $basePath . '/server.php';

0 commit comments

Comments
 (0)