Skip to content

Commit 7d23d5b

Browse files
authored
Isolate config require (#102)
1 parent 2b97072 commit 7d23d5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Initializer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ public function initConfiguration(
8585
$this->printer->printLine('<gray>Using config</gray> ' . $configPath);
8686

8787
try {
88-
$config = require $configPath;
88+
$config = (static function () use ($configPath) {
89+
return require $configPath;
90+
})();
8991
} catch (Throwable $e) {
9092
throw new InvalidConfigException(get_class($e) . " in {$e->getFile()}:{$e->getLine()}\n > " . $e->getMessage(), 0, $e);
9193
}

0 commit comments

Comments
 (0)