|
|
@@ -1,6 +1,30 @@
|
|
|
: << 'CMDBLOCK'
|
|
|
@echo off
|
|
|
-REM Polyglot wrapper: runs .sh scripts cross-platform
|
|
|
+REM ============================================================================
|
|
|
+REM DEPRECATED: This polyglot wrapper is no longer used as of Claude Code 2.1.x
|
|
|
+REM ============================================================================
|
|
|
+REM
|
|
|
+REM Claude Code 2.1.x changed the Windows execution model for hooks:
|
|
|
+REM
|
|
|
+REM Before (2.0.x): Hooks ran with shell:true, using the system default shell.
|
|
|
+REM This wrapper provided cross-platform compatibility by
|
|
|
+REM being both a valid .cmd file (Windows) and bash script.
|
|
|
+REM
|
|
|
+REM After (2.1.x): Claude Code now auto-detects .sh files in hook commands
|
|
|
+REM and prepends "bash " on Windows. This broke the wrapper
|
|
|
+REM because the command:
|
|
|
+REM "run-hook.cmd" session-start.sh
|
|
|
+REM became:
|
|
|
+REM bash "run-hook.cmd" session-start.sh
|
|
|
+REM ...and bash cannot execute a .cmd file.
|
|
|
+REM
|
|
|
+REM The fix: hooks.json now calls session-start.sh directly. Claude Code 2.1.x
|
|
|
+REM handles the bash invocation automatically on Windows.
|
|
|
+REM
|
|
|
+REM This file is kept for reference and potential backward compatibility.
|
|
|
+REM ============================================================================
|
|
|
+REM
|
|
|
+REM Original purpose: Polyglot wrapper to run .sh scripts cross-platform
|
|
|
REM Usage: run-hook.cmd <script-name> [args...]
|
|
|
REM The script should be in the same directory as this wrapper
|
|
|
|