From 6c20c5f2967d281f4d46dd63018824efb82d1d97 Mon Sep 17 00:00:00 2001 From: Henrik Brodin <90325907+hbrodin@users.noreply.github.com> Date: Thu, 2 Apr 2026 11:26:08 +0200 Subject: [PATCH] fix: simplify separator to POSIX-portable character class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use [[:space:]:/+] instead of alternation group with \+ — unambiguously literal in all POSIX ERE implementations. Co-Authored-By: Claude Opus 4.6 (1M context) --- settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json b/settings.json index 2fff78c..6ada939 100644 --- a/settings.json +++ b/settings.json @@ -57,7 +57,7 @@ }, { "type": "command", - "command": "CMD=$(jq -r '.tool_input.command'); if echo \"$CMD\" | grep -qE 'git[[:space:]]+push[[:space:]].*([[:space:]]|:|/|\\+)(main|master)([[:space:]]|$)'; then echo 'BLOCKED: Use feature branches, not direct push to main' >&2; exit 2; fi" + "command": "CMD=$(jq -r '.tool_input.command'); if echo \"$CMD\" | grep -qE 'git[[:space:]]+push[[:space:]].*[[:space:]:/+](main|master)([[:space:]]|$)'; then echo 'BLOCKED: Use feature branches, not direct push to main' >&2; exit 2; fi" } ] }