From 34e5d1c97e8f55b62a90cd1e43b1bb5f0a3ab6be Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 7 Nov 2026 21:39:50 +0000 Subject: [PATCH] fix(install): install jscpd under ~/.local instead of the system prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm install --global without a prefix writes to /usr/lib/node_modules and fails with EACCES for a normal user, so every make install warned and principles.py skipped its clone hits. --prefix ~/.local puts the binary in ~/.local/bin, which is on PATH. 🎯 Fix: 92 % 💥 Break: 3 % 💸 Cost: 100 % ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 89 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 --- scripts/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index ce79075..af7ec22 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -102,9 +102,9 @@ if [[ "${TARGET}" == "${HOME}" ]]; then if command -v jscpd &>/dev/null; then log "skills: jscpd is installed" elif ! command -v npm &>/dev/null; then - warn "skills: npm not found; install jscpd with 'npm install --global ${jscpd_pin}'. Until then principles.py skips its clone hits." - elif npm install --global "${jscpd_pin}"; then - log "skills: installed ${jscpd_pin} for the principles.py clone hits" + warn "skills: npm not found; install jscpd with 'npm install --global --prefix ~/.local ${jscpd_pin}'. Until then principles.py skips its clone hits." + elif npm install --global --prefix "${HOME}/.local" "${jscpd_pin}"; then + log "skills: installed ${jscpd_pin} into ~/.local/bin for the principles.py clone hits" else warn "skills: the jscpd install failed; principles.py skips its clone hits." fi