no-mistakes(review): Remove stale OpenCode npm shims and fix oc2 hint

This commit is contained in:
Lap Tran committed 2026-11-08 18:13:24 -05:00
1 parent 3c7d2662a4
commit 2787bcc9ac
2 files changed
+14 -3

No files matched your search

+11
View File
@@ -33,6 +33,17 @@ if [ -x "$NPM" ] && npm_root="$("$NPM" root -g 2>/dev/null)"; then
fi
done
fi
# `opencode` links without --overwrite, so any npm shim left in the Homebrew
# prefix aborts the switch's brew bundle link step. Drop the retired packages'
# shims directly, which also covers a failed uninstall and a missing npm.
for link in /opt/homebrew/bin/*; do
case "$(readlink "$link" 2>/dev/null || true)" in
*/node_modules/@opencode-ai/cli/* | */node_modules/opencode-ai/*)
rm -f "$link"
echo "==> Removed stale OpenCode npm shim $link"
;;
esac
done
echo "==> Updating no-mistakes..."
NO_MISTAKES_BIN="$HOME/.no-mistakes/bin/no-mistakes"