diff --git a/.bumpy/fix-postinstall-breaking-installs.md b/.bumpy/fix-postinstall-breaking-installs.md new file mode 100644 index 0000000..79d53ee --- /dev/null +++ b/.bumpy/fix-postinstall-breaking-installs.md @@ -0,0 +1,5 @@ +--- +fledgling: patch +--- + +Fix `npx fledgling` (and every other install) doing nothing at all. The `postinstall: lefthook install` script ran on end-user installs, but `lefthook` is a devDependency and isn't there — so the script exited 127, npm aborted the install before ever reaching the `bin`, and since npm swallows script output at the default loglevel you got zero output and no error. Moved git-hook installation to `prepare`, which runs in the repo and before publish but not for consumers installing from the registry. diff --git a/package.json b/package.json index ab7c056..03ff2c7 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "dev": "tsdown --watch", "typecheck": "tsc --noEmit", "start": "node dist/cli.mjs", - "postinstall": "lefthook install" + "prepare": "lefthook install || true" }, "dependencies": { "@clack/prompts": "^1.5.1",