From a092c39b90df2a11dfe94e3f57f980559dc99182 Mon Sep 17 00:00:00 2001 From: simaonogueira101 Date: Wed, 11 Feb 2026 15:16:44 +0000 Subject: [PATCH] fix: include postinstall script in package and add restart hint The postinstall script was missing from the `files` array so npm never included it in the published tarball -- the `|| true` silenced the error. Add `scripts/postinstall.js` to `files`. Also tell users to restart their terminal after installing Bun, since the installer only updates shell config files and the current session won't pick up the new PATH entry. Co-authored-by: Cursor --- bin/cli.mjs | 2 +- package.json | 3 ++- scripts/postinstall.js | 2 +- test/postinstall.test.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/cli.mjs b/bin/cli.mjs index 8df48bc..75c5fb4 100755 --- a/bin/cli.mjs +++ b/bin/cli.mjs @@ -24,7 +24,7 @@ try { console.error( "talent-agent requires the Bun runtime.\n\n" + " Install it: curl -fsSL https://bun.sh/install | bash\n" + - " Learn more: https://bun.sh\n", + " Then restart your terminal (or run: source ~/.bashrc)\n", ); process.exit(1); } diff --git a/package.json b/package.json index 6e06d1c..239a134 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "files": [ "src", "skills", - "bin" + "bin", + "scripts/postinstall.js" ], "exports": { ".": "./src/lib.ts", diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 29c432a..66e2682 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -26,7 +26,7 @@ console.log(""); if (!hasBun) { console.log(" Bun runtime is required but was not found."); console.log(" Install it: curl -fsSL https://bun.sh/install | bash"); - console.log(" Learn more: https://bun.sh"); + console.log(" Then restart your terminal (or run: source ~/.bashrc)"); console.log(""); } diff --git a/test/postinstall.test.ts b/test/postinstall.test.ts index 44977f0..ecdab5a 100644 --- a/test/postinstall.test.ts +++ b/test/postinstall.test.ts @@ -83,5 +83,6 @@ describe("scripts/postinstall.js", () => { expect(stdout).toContain("Bun runtime is required but was not found"); expect(stdout).toContain("curl -fsSL https://bun.sh/install | bash"); + expect(stdout).toContain("restart your terminal"); }); });