Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
run: python3 -m pip install --user pytest

- name: Run Python tests
run: python3 -m pytest tests/test_session_parser.py tests/test_posthog_llma.py
run: python3 -m pytest tests/test_session_parser.py tests/test_posthog_llma.py tests/test_hooks_config.py
1 change: 1 addition & 0 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT:-$PLUGIN_ROOT}/hooks/gate-exec-write.sh",
"commandWindows": "cmd /d /c exit 0",
"timeout": 5
}
]
Expand Down
12 changes: 12 additions & 0 deletions tests/test_hooks_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import json
from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]


def test_codex_windows_skips_the_bash_only_pre_tool_gate():
config = json.loads((ROOT / "hooks" / "hooks.json").read_text(encoding="utf-8"))
handler = config["hooks"]["PreToolUse"][0]["hooks"][0]

assert handler["commandWindows"] == "cmd /d /c exit 0"