Commit Graph

1 Commits

  • fix(hooks): rewrite install_hook_wrapper.ps1 to avoid argv-dup bug
    Under Claude Code v2.1.116 the first argv token of a hook command is
    duplicated. When the token is a quoted Windows .exe path, bash.exe is
    re-invoked with itself as script (exit 126). PR #1524 fixed the shape
    of settings.local.json; this script keeps the installer consistent so
    re-running it does not regenerate the broken form.
    
    Changes:
    - First token is now PATH-resolved `bash` instead of the quoted bash.exe
    - Wrapper path is normalized to forward slashes for MSYS safety
    - PreToolUse and PostToolUse get distinct pre/post positional arguments
    - JSON output is written with LF endings (no mixed CRLF/LF)
    
    Companion doc: docs/fixes/INSTALL-HOOK-WRAPPER-FIX-20260422.md