Skip to content

Commit c0e0b1f

Browse files
committed
feat(Bootstrap.php): start now loads environment variables.
1 parent 183e313 commit c0e0b1f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ or you can start with a web server
4545
composer create-project catpaw/web-starter
4646
```
4747

48+
# Install Dependencies
49+
```bash
50+
make install
51+
```
52+
4853
# Program Structure
4954

5055
Every program must declare a `main` function in the global scope, that will be your entry point.

src/lib/Core/Bootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ public static function start(
8282

8383
$env = new SimpleEnvironment($logger);
8484
Container::provide(EnvironmentInterface::class, $env);
85+
$env->load()->unwrap($envLoadError);
86+
if ($envLoadError) {
87+
self::kill((string)$envLoadError);
88+
}
8589

8690
$env->set('MAIN', $main);
8791
$env->set('LIBRARIES', $libraries);

0 commit comments

Comments
 (0)