You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: varlock/auto-load succeeds silently with no .env.schema, while load and run fail #1143
All three fail the same way, since there is nothing to load or validate.
What is actually happening?
1 and 2 exit 1 with "Run varlock init to create a .env.schema file, or use --path to specify a file or directory."
3 exits 0 and prints API_URL = undefined. varlock/auto-load succeeds silently, so validation is skipped and every ENV value is undefined.
Real ways to end up there: starting the app from a different working directory than the schema's, a monorepo package run from its own folder, or a build or archive that leaves the .env* files out (for example through export-ignore in .gitattributes). The app then starts with no config and fails later, far from the cause.
Suggested fix: make auto-load fail (or at least warn loudly) when no schema is found, like load and run, with an explicit opt-out for setups that rely on it.
System Info
macOS 27.0 (arm64)
Node v24.21.0
Bun 1.4.2
varlock 1.21.0
Any additional comments?
Found when a source-archive build ran with every value undefined because the archive excluded the schema files.
Activity
pullfrog commentedon Sep 28, 2026
Warn when a load finds no schema; add _VARLOCK_ALLOW_NO_SCHEMA
Error when a load finds no schema
Error when a load finds no schema
Error when a load finds an empty config
Warn when a load finds an empty config; add _VARLOCK_ALLOW_EMPTY_CONF…