Repository navigation
fix(init): stop un-ignoring .env.example in scaffolded projects - #759
Merged
cpojer merged 1 commit intoNov 9, 2026
Merged
Conversation
Void refuses to start when .env.example exists, so the scaffolded .gitignore should not allow committing it. Mention env.ts in the error for anyone adding the file out of habit. Closes voidzero-dev#757 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #757
Problem
void initwrites!.env.exampleto.gitignore, but since #311 Void refuses to start when that file exists. New projects were being told to commit a file that stops dev and build.Changes
!.env.examplefromSCAFFOLD_GITIGNORE_LINES, so.env.*now ignores it..env.exampleis one of the reported files, the dev/build error andvoid env checknow add: "env.ts lists the keys this app expects, so .env.example is not needed." Other legacy files such as.env.localget the same message as before.initunit test and thepacked-consumerassertion that expected the file to stay un-ignored, and add coverage for the new message on both paths.Existing projects are unaffected:
void initonly appends missing.gitignorelines, so a line already there stays.Verification
vp run check, format and lint pass.vp test run: passes. The first run had failures from a missing Playwright browser and stale playground builds, plus one port conflict; after installing Chromium and runningvp run build:all, all 33 of those files passed when rerun..github/scripts/packed-consumer.mjswas not run locally, so CI will be the first run of that assertion.Note
Both errors tell users to "follow the env migration guide", but no guide with that name exists in
docs/. That wording predates this PR and is left unchanged.🤖 Generated with Claude Code