Skip to content

Conversation

@Muminur
Copy link

@Muminur Muminur commented Dec 31, 2025

Summary

  • Fixed Windows compatibility issue where the stop hook fails with error: The operation was aborted. Check that the command exists and is executable.
  • The root cause is that Windows cannot directly execute .sh files - they need to be invoked through bash explicitly
  • Updated hooks.json to use bash command prefix, which works cross-platform when Git for Windows or WSL is installed

Problem

On Windows, the Ralph Wiggum plugin hook fails because:

  1. Windows doesn't associate .sh files with a shell interpreter
  2. The hook command ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh is passed directly to the OS, which doesn't know how to execute it

Solution

Changed the hook command from:

"command": "${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh"

To:

"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh\""

This explicitly invokes bash to run the script, which works on:

  • Linux/macOS: bash is the default shell
  • Windows: Works when Git for Windows (Git Bash) or WSL is installed, which is common for developers

Test Plan

  • Tested on Windows 11 with Git for Windows installed
  • Verified the hook executes without errors

The stop-hook.sh script fails on Windows because .sh files are not
directly executable. This fix explicitly invokes bash to run the
shell script, which works cross-platform when Git for Windows or
WSL is installed.

Fixes hook error: 'The operation was aborted. Check that the command
exists and is executable.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant