Skip to content

pull --out silently overwrites existing files without --overwrite - #6

Open
dipeshbabu wants to merge 3 commits into
subconscious-systems:mainfrom
dipeshbabu:fix/output-overwrite
Open

dipeshbabu wants to merge 3 commits into
subconscious-systems:mainfrom
dipeshbabu:fix/output-overwrite

Conversation

@dipeshbabu

Copy link
Copy Markdown

vibi pull <id> --out file calls writeFileSync with its default truncating mode even if --overwrite was not supplied, destroying a different existing file.

Create output files exclusively, tolerate identical existing contents, and require --overwrite for replacement. Tests cover new, identical, different, empty, and missing-parent destinations.

Validation: frozen-lockfile dependencies, typecheck, full tests, npm build, and bundled CLI version/help smoke checks. Ubuntu/Windows Node 20/22 CI passed before PR creation on this exact head commit (de9c5ea): https://github.com/dipeshbabu/vibi-cli/actions/runs/37262989242

This branch includes the CI foundation from #2; merging that PR first removes the common CI changes from this diff.

Closes #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pull --out silently overwrites existing files without --overwrite

1 participant