Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Windows, Cursor uses a PowerShell snippet to decode hook metadata and pass it to hook scripts. When the integrated terminal’s default profile is set to Git Bash, this PowerShell snippet is sent to Bash and causes a syntax error because Bash cannot parse PowerShell constructs like [Convert]::FromBase64String. As a result, project-level hooks fail to execute and the hook script is not run. The terminal shows an error such as:
--: eval: line 1: syntax error near unexpected token '[Convert]::FromBase64String'
Steps to Reproduce
-
Set
terminal.integrated.defaultProfile.windowsto “Git Bash” in Cursor settings. -
Create a
.cursor/hooks.jsonfile that defines a project-level hook (for example, astophook) that points to a.shscript. -
Trigger the hook (e.g., by invoking the
stophook via Cursor). -
The integrated terminal opens in Git Bash and immediately prints an error:
--: eval: line 1: syntax error near unexpected token '[Convert]::FromBase64String'The hook does not run.
Expected Behavior
Hooks should execute successfully regardless of the user’s default shell. Cursor should pass hook metadata to scripts using a cross-platform method rather than injecting a PowerShell-only snippet. When Git Bash is the default terminal on Windows, the hook should still run without syntax errors and properly receive the metadata.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.3.21 (system setup)
VSCode Version: 1.105.1
Commit: 68e0a0385b87408d050869ea543e3778ad53f780
Date: 2026-01-02T23:46:13.381Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor