Skip to content

Commit 85f0d1e

Browse files
committed
fix: catch npm shorthands (npm i, npm t, etc.) in bun enforcement hook
1 parent 2b7139e commit 85f0d1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.claude/hooks/enforce-bun.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ -z "$COMMAND" ]; then
99
fi
1010

1111
# Check for npm commands (including npx)
12-
if echo "$COMMAND" | grep -qE '(^|[;&|]\s*)npm\s+(install|ci|run|test|exec|start|publish|version|update|uninstall|link|pack|audit|init|dedupe|ls|outdated|prune|rebuild|cache)\b'; then
12+
if echo "$COMMAND" | grep -qE '(^|[;&|]\s*)npm(\s|$)'; then
1313
echo "This project uses bun, not npm. Use the equivalent bun command instead." >&2
1414
exit 2
1515
fi

0 commit comments

Comments
 (0)