From ec0e36a6527807cb0378407a5c0e1af2533e94ec Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Tue, 13 Oct 2026 00:09:43 +0000 Subject: [PATCH] install.sh: create bun's global manifest before bun add -g Co-Authored-By: Claude Opus 5.5 --- apps/server/public/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/server/public/install.sh b/apps/server/public/install.sh index 157377f..e1a83c9 100644 --- a/apps/server/public/install.sh +++ b/apps/server/public/install.sh @@ -26,6 +26,10 @@ say "Installing tsbb, tsbb-tui and tsbb-mcp..." node_ok || die "Node >= 22.6 required (found $(node -v 2>/dev/null || echo none)). Install it from https://nodejs.org" if have bun; then + # Without a global manifest, bun add -g writes into the nearest package.json above it. + BUN_GLOBAL="${BUN_INSTALL:-$HOME/.bun}/install/global" + mkdir -p "$BUN_GLOBAL" + [ -f "$BUN_GLOBAL/package.json" ] || printf '{}\n' > "$BUN_GLOBAL/package.json" bun add -g $PKGS BIN_DIR="${BUN_INSTALL:-$HOME/.bun}/bin" elif have npm; then