mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 08:15:17 +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:
1 parent
e6aa8ac453
commit
13824b61ca
1 file changed
+3
@@ -90,6 +90,9 @@ echo "[i] Found tarball: $TARBALL"
|
|||||||
echo "[i] Installing globally with $PKG_MANAGER..."
|
echo "[i] Installing globally with $PKG_MANAGER..."
|
||||||
|
|
||||||
if [ "$PKG_MANAGER" = "bun" ]; then
|
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 requires file: protocol for local tarballs
|
||||||
bun add -g "file:$(pwd)/$TARBALL"
|
bun add -g "file:$(pwd)/$TARBALL"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user