Skip to content

Commit 6aa1614

Browse files
committed
fix: allow cargo/npm build commands through hook
1 parent f3755c0 commit 6aa1614

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.claude-plugin/hooks/leankg-pretooluse.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ function isCodeSearchTool(toolName, toolInput) {
5656

5757
if (toolName === "Bash") {
5858
const cmd = (toolInput.command || "").toLowerCase();
59+
// Allow cargo/npm/etc build commands through - they're not code search
60+
const isBuildCmd = /^(cargo|npm|pnpm|yarn|go|make|cmake|rustc)/.test(cmd);
61+
if (isBuildCmd) return false;
5962
const isSearch = SEARCH_COMMANDS.some(c => cmd.includes(c));
6063
const isLeankgCmd = cmd.includes("leankg");
6164
return isSearch && !isLeankgCmd;

0 commit comments

Comments
 (0)