memorix
memorix copied to clipboard
Don't override .env.example if it exists
Memorix overwrote my existing .env.example after memorix init.
One proposal: if .env.example exists, use .env.memorix-example or just default to it.
Thanks, this is a real bug. I patched it locally and validated it with focused tests.
What changed:
- memorix init no longer overwrites an existing .env.example
- if the target project already has .env.example, Memorix now writes its template to .env.memorix-example instead
- the follow-up prompt now references whichever template file was actually created
Validation:
- added a focused test for template target selection
- npm run lint passes
I will carry this into the next patch so Memorix stops stepping on project-owned env templates.