From 3deebfed19f255348399ac7f985cc8fbe1555d43 Mon Sep 17 00:00:00 2001 From: Igor Lins e Silva <4753812+igorls@users.noreply.github.com> Date: Mon, 27 Apr 2026 02:45:04 -0300 Subject: [PATCH] test(hooks): skip bash subprocess validator test on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `bash` on the Windows CI runner resolves to `wsl.exe` which fails with "Windows Subsystem for Linux has no installed distributions." The shell hooks themselves are POSIX-only — Windows users use the Python entry point — so the bash-subprocess exercise is non-applicable on win32. The static-grep validator tests still run on every platform, so the shell-side validation is still asserted under Windows; only the live bash invocation is skipped. --- tests/test_save_hook_mines.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_save_hook_mines.py b/tests/test_save_hook_mines.py index d9f40e8..e11234a 100644 --- a/tests/test_save_hook_mines.py +++ b/tests/test_save_hook_mines.py @@ -9,6 +9,9 @@ Written BEFORE the fix. """ import os +import sys + +import pytest class TestSaveHookAutoMines: @@ -94,6 +97,10 @@ class TestShellHookTranscriptValidation: 'is_valid_transcript_path "$TRANSCRIPT_PATH"' in src ), "validator must be invoked against TRANSCRIPT_PATH before mining" + @pytest.mark.skipif( + sys.platform == "win32", + reason="shell hooks are POSIX-only; Windows CI bash maps to wsl.exe with no distro", + ) def test_validators_run_via_bash(self, tmp_path): """Source the validator out of each hook and exercise it directly.""" import subprocess