This repository was archived by the owner on Sep 10, 2026. It is now read-only.
Repository navigation
Refuse an occupied destination before asking, not after - #43
Merged
Merged
Conversation
`scaffoldGame` raised `target already exists` at the very end, so the CLI greeted you, probed for Firebase, and took an organization, a git answer and a workflows answer before mentioning that the directory was taken. That is the same insult as learning `flutterfire` is missing after two minutes of Flutter and pub, which this release just finished fixing. `destinationProblem` is now asked before the greeting. It names the first three entries standing in the way rather than saying "not empty", because that usually settles whether the path was mistyped or already scaffolded once, where a bare "not empty" only invites an `ls`. It deliberately does not offer to remove the directory, which is where several scaffolders in this family go. This one writes ninety-odd files and calls `flutter create`; the cost of that answer being wrong against a mistyped path has no upper bound, and every other question here is reversible. A directory that exists and is empty is no longer refused at all — people make one out of habit, and cloning a repository with no first commit leaves exactly that. It is removed and rewritten, since the staging rename publishes itself *as* that path and cannot do it while something is standing there. The changeset is amended rather than added to: #41 is merged but the release PR is still open, so this is the same unreleased change. Co-Authored-By: Claude Opus 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Follow-up to #41, which is merged but not yet released — Release PR #42 is still open, so this amends that changeset rather than adding a second one. Same version, one coherent entry.
The gap
scaffoldGameraisedtarget already existsatindex.ts:743, which runs after every question. So the flow was: greeting, Firebase probe, organization prompt (the one you're meant to think about, because Google Play freezes it), git, workflows — and then "target already exists".That is precisely the failure mode #41 set out to remove. The comment on
firebaseReadinesssays learningflutterfireis missing "costs nothing here and costs two minutes of Flutter and pub at the far end". Same argument, and I missed this instance of it.destinationProblemis now asked before the greeting, alongside the slug validation.The message
Three entries named rather than a count. "Not empty" only invites an
ls; the three that are actually there usually settle whether this was a mistyped path or a directory already scaffolded once.No "remove it and continue?"
Several scaffolders in this family offer that. This one writes ninety-odd files and calls
flutter create, and the cost of that answer being wrong against a mistyped path has no upper bound. Every other question this CLI asks is reversible; that one would not be, so it stays a refusal andrm -rfstays a command belonging to the person who can see what is in there.Worth noting this is the one place I did not follow the question-per-flag rule from #41, and the reason is that rule's own logic — a question exists to let someone decide something, not to let a pipe decide it.
Empty directories are now fine
Refusing over nothing was its own papercut: people
mkdir my-gameout of habit, and cloning a repository that has no first commit yet leaves exactly an empty directory. It is removed and rewritten, because the staging rename publishes itself as that path and cannot do so while anything is standing there.Verification
biome check .clean;tsc --noEmitclean.🤖 Generated with Claude Code