Commit Graph
2 Commits
Author SHA1 Message Date
Alaister Young 2413adbb27 fix(studio): only skip missing env files, surface other read errors
readEnvFiles swallowed every readFileSync error, so an existing-but-
unreadable env file (bad permissions, IO error) was silently treated as
absent — dropping its values and potentially booting serve.js without
secrets like POSTGRES_PASSWORD. Skip only ENOENT and rethrow the rest.

Addresses PR review feedback.
2026-06-23 22:48:55 +08:00
Alaister Young 91d996643a refactor(studio): share .env parsing between dispatch and serve scripts
Extract the .env parser into scripts/lib/env.js so dispatch.js and serve.js
use one implementation instead of duplicating the regex. dispatch.js now
reads .env as well as .env.local (matching serve.js / vite precedence:
shell > .env.local > .env), so STUDIO_FRAMEWORK set in .env is picked up —
previously only .env.local was read, which is why setting it in .env
silently did nothing.

Addresses PR review feedback.
2026-06-23 22:39:18 +08:00