fix(install): install jscpd under ~/.local instead of the system prefix

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 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-07 21:39:50 +00:00
1 parent 089f8dbb9f
commit 34e5d1c97e
1 file changed
+3 -3
+3 -3
View File
@@ -102,9 +102,9 @@ if [[ "${TARGET}" == "${HOME}" ]]; then
if command -v jscpd &>/dev/null; then if command -v jscpd &>/dev/null; then
log "skills: jscpd is installed" log "skills: jscpd is installed"
elif ! command -v npm &>/dev/null; then 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." 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 "${jscpd_pin}"; then elif npm install --global --prefix "${HOME}/.local" "${jscpd_pin}"; then
log "skills: installed ${jscpd_pin} for the principles.py clone hits" log "skills: installed ${jscpd_pin} into ~/.local/bin for the principles.py clone hits"
else else
warn "skills: the jscpd install failed; principles.py skips its clone hits." warn "skills: the jscpd install failed; principles.py skips its clone hits."
fi fi