Reviewer noted that returning on the first found file meant a project-root `.env.build` could shadow the dev `.env`, leaving the server without `PORT`/`HOST`/`SESSION_SECRET`. Switch `loadEnv()` to iterate every candidate with `override:false` so multiple files merge — first-loaded value wins per key. Order also reshuffled so dev's `.env` takes precedence over `.env.build` at the project root (server settings stay alive), while in packaged mode `resources/.env.build` still wins. Verified manually with a temp-dir reproduction. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2.7 KiB
2.7 KiB