From 3e4ddfffb1bd275e3e7d917c1c1782a95f600a9c Mon Sep 17 00:00:00 2001 From: Seenu K Date: Sat, 8 Aug 2026 12:54:29 +0530 Subject: [PATCH] Stop claiming a cloned repository scaffolds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The changeset said an empty destination covers "cloning a repository with no first commit". It does not: a clone leaves `.git`, which is refused like any other entry. That text becomes the published 0.9.0 changelog, so it would have promised `git clone && create-eigen-game` works. The `destinationProblem` comment repeated the same claim, and now says why the case is not supported rather than implying it is — publishing into a clone means parking `.git`, renaming staging over the top and putting it back, with a failure in the middle able to orphan a remote. Release PR #42 has not consumed the changeset yet, so this still lands in the same release. Co-Authored-By: Claude Opus 5 --- .changeset/lucky-moons-shake.md | 2 +- packages/create-eigen-game/src/index.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.changeset/lucky-moons-shake.md b/.changeset/lucky-moons-shake.md index e482260..91e88e3 100644 --- a/.changeset/lucky-moons-shake.md +++ b/.changeset/lucky-moons-shake.md @@ -14,6 +14,6 @@ Git and the GitHub Actions workflows are questions too, defaulted yes and no res `--ci` is gone. It read as "I am running in CI" — which is what it means in `npm ci`, in Jest, and in this CLI's own `isCI` check — while actually meaning "emit GitHub Actions workflows". It is now `--workflows` / `--no-workflows`, and the subcommand is `add workflows`. `add ci` still works, undocumented, because it is written into the README of every project already scaffolded. -An occupied destination is refused **before** the first question rather than by `scaffoldGame` after the last one. Being told the directory was taken after carefully giving an organization is the same insult as being told about `flutterfire` after two minutes of Flutter and pub. The message names the first three things standing in the way, which usually settles whether the path was mistyped or already scaffolded once — where "not empty" only invites an `ls`. There is deliberately no offer to delete it: every other question here is reversible and that one is not. A directory that exists and is *empty* is no longer refused at all, since people make one out of habit and cloning a repository with no first commit leaves exactly that. +An occupied destination is refused **before** the first question rather than by `scaffoldGame` after the last one. Being told the directory was taken after carefully giving an organization is the same insult as being told about `flutterfire` after two minutes of Flutter and pub. The message names the first three things standing in the way, which usually settles whether the path was mistyped or already scaffolded once — where "not empty" only invites an `ls`. There is deliberately no offer to delete it: every other question here is reversible and that one is not. A directory that exists and is *empty* is no longer refused at all, since people make one out of habit. A cloned repository is not that case — `.git` stands in the way like any other entry, and the message names it — so `git clone` then scaffold still means scaffolding beside it and moving the result in. Also adds `--version`, and stops asking about git at all when the destination is already inside a repository, since the scaffold declines to nest one there whatever it is told. diff --git a/packages/create-eigen-game/src/index.ts b/packages/create-eigen-game/src/index.ts index 6f76ebc..d00cb41 100644 --- a/packages/create-eigen-game/src/index.ts +++ b/packages/create-eigen-game/src/index.ts @@ -630,10 +630,14 @@ function signedOut(probe: Probe): boolean { * Why this destination cannot be scaffolded into, said as a whole message, or * `undefined` when there is nothing in the way. * - * A directory that exists and is *empty* is not in the way. People make one out - * of habit, and cloning a repository that has not had its first commit yet - * leaves exactly that — so it is removed and rewritten rather than refused over - * nothing. Anything with contents in it is refused. + * A directory that exists and is *empty* is not in the way — people make one + * out of habit — so it is removed and rewritten rather than refused over + * nothing. Anything with contents in it is refused, and a cloned repository is + * not an exception: `.git` is in the way like any other entry, and the message + * names it. Publishing into one would mean parking `.git`, renaming staging + * over the top and putting it back, with a failure in the middle able to + * orphan a remote — which is a lot of care to spend on a flow that has a + * one-line alternative. * * Refused, and deliberately not offered as a "remove it and continue?" * question, which is where several scaffolders in this family go. This one