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.
This commit is contained in:
kaitranntt
2025-12-16 22:04:23 -05:00
parent e6aa8ac453
commit 13824b61ca
+3
View File
@@ -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