Description
Two tests in the ix unavailable notification section of tests/test_hooks.sh fail on Git Bash for Windows with exit code 127:
── ix unavailable notification ─────────────────────────────────────────────────
FAIL unavailable/first hook fire emits systemMessage — expected exit 0, got 127
FAIL unavailable/subsequent hook fires are silent — expected exit 0, got 127
Results: 81 passed, 2 failed
Root cause
tests/test_hooks.sh lines 956–994 simulate "ix not in PATH" by invoking bash hooks/ix-intercept.sh with PATH="/usr/bin:/bin". On Linux/macOS that PATH still contains the basic POSIX utilities the hook needs (jq, cat, etc.). On Git Bash for Windows, those utilities live under /mingw64/bin and /usr/bin/vendor_perl, and /usr/bin:/bin is missing the loader/symlinks needed to launch most binaries — so the hook can't even start and exits 127 before it has a chance to detect ix and emit a systemMessage.
The hook code itself is fine; the test setup is non-portable.
Steps to reproduce
- Clone
ix-claude-plugin on a Windows machine with Git Bash
bash tests/test_hooks.sh
- Observe the two failures above; remaining 81 tests pass
Expected behavior
Either:
- The test runner detects a non-POSIX-clean PATH environment and skips these two cases with a clear "skip on Windows" message, or
- The PATH-stripping uses a portable mechanism (e.g. removes only the ix-bin directory from PATH instead of replacing PATH wholesale) so the hook can still run on Git Bash.
Actual behavior
Tests fail with expected exit 0, got 127, which masks any genuine regression in this code path when developers run the suite on Windows.
Environment
- OS: Windows 11, Git Bash (msys2)
- Shell: bash 5.x
- Plugin commit:
e92aa16 (current main)
Notes
Originally noticed while running tests/test_hooks.sh for PR #19. These same two failures are present on main independent of that PR, so this is not a regression — just an existing portability gap worth tracking.
Description
Two tests in the
ix unavailable notificationsection oftests/test_hooks.shfail on Git Bash for Windows with exit code 127:Root cause
tests/test_hooks.shlines 956–994 simulate "ix not in PATH" by invokingbash hooks/ix-intercept.shwithPATH="/usr/bin:/bin". On Linux/macOS that PATH still contains the basic POSIX utilities the hook needs (jq,cat, etc.). On Git Bash for Windows, those utilities live under/mingw64/binand/usr/bin/vendor_perl, and/usr/bin:/binis missing the loader/symlinks needed to launch most binaries — so the hook can't even start and exits 127 before it has a chance to detect ix and emit asystemMessage.The hook code itself is fine; the test setup is non-portable.
Steps to reproduce
ix-claude-pluginon a Windows machine with Git Bashbash tests/test_hooks.shExpected behavior
Either:
Actual behavior
Tests fail with
expected exit 0, got 127, which masks any genuine regression in this code path when developers run the suite on Windows.Environment
e92aa16(current main)Notes
Originally noticed while running
tests/test_hooks.shfor PR #19. These same two failures are present onmainindependent of that PR, so this is not a regression — just an existing portability gap worth tracking.