coding
The Problem
Claude Code runs hook commands through the system's default shell: - **Windows**: CMD.exe - **macOS/Linux**: bash or sh This creates several challenges: 1. **Script execution**: Windows CMD can't execute `.sh` files directly - it tries to open them in a text editor 2. **Path format**: Windows uses backslashes (`C:\path`), Unix uses forward slashes (`/path`) 3. **Environment variables**: `$VAR` syntax doesn't work in CMD 4. **No `bash` in PATH**: Even with Git Bash installed, `bash` isn't in the PATH when CMD runs
← 返回教程列表
AI8899 · 内容仅供学习参考