From 13824b61caa2905f267a2b0fdbeaeb1886352b46 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Tue, 16 Dec 2025 22:04:23 -0500 Subject: [PATCH] fix(dev-install): prevent duplicate entries in bun global package.json Bun's `add -g` with file: protocol appends instead of replacing existing entries, causing duplicate key warnings on repeated installs. Fix by removing the package before re-adding. --- scripts/dev-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/dev-install.sh b/scripts/dev-install.sh index 41d9f38f..5d468d06 100755 --- a/scripts/dev-install.sh +++ b/scripts/dev-install.sh @@ -90,6 +90,9 @@ echo "[i] Found tarball: $TARBALL" echo "[i] Installing globally with $PKG_MANAGER..." if [ "$PKG_MANAGER" = "bun" ]; then + # Remove existing to avoid duplicate key warnings in bun's global package.json + # (bun add -g appends instead of replacing file: protocol entries) + bun remove -g @kaitranntt/ccs 2>/dev/null || true # Bun requires file: protocol for local tarballs bun add -g "file:$(pwd)/$TARBALL" else