mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 00:16:46 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user