Skip to content

fix: Windows compatibility — skip /dev/tty, guard jq dependency - #68

Open
ytzhao wants to merge 1 commit into
warpdotdev:mainfrom
ytzhao:fix/windows-compat
Open

fix: Windows compatibility — skip /dev/tty, guard jq dependency#68
ytzhao wants to merge 1 commit into
warpdotdev:mainfrom
ytzhao:fix/windows-compat

Conversation

@ytzhao

@ytzhao ytzhao commented Jun 16, 2026

Copy link
Copy Markdown
  • Add _is_windows() helper to detect MSYS/MINGW/Cygwin environments
  • Skip /dev/tty writes on Windows (no such device), always use terminalSequence JSON path instead
  • Add early-exit guard in build-payload.sh when jq is missing, with a clear error message instead of confusing 'command not found'
  • Add tests for _is_windows, Windows emit_terminal_sequence fallback, and jq-missing graceful degradation
  • Update README with platform-specific jq install instructions

- Add _is_windows() helper to detect MSYS/MINGW/Cygwin environments
- Skip /dev/tty writes on Windows (no such device), always use
  terminalSequence JSON path instead
- Add early-exit guard in build-payload.sh when jq is missing,
  with a clear error message instead of confusing 'command not found'
- Add tests for _is_windows, Windows emit_terminal_sequence fallback,
  and jq-missing graceful degradation
- Update README with platform-specific jq install instructions
@maycuatroi1

Copy link
Copy Markdown

Repro on Windows 11 + Git Bash (Claude Code, warp plugin 2.2.0). Both failures this PR targets do happen:

build-payload.sh: line 49: jq: command not found
PostToolUse:TaskCreate hook error

After installing jq, the second one surfaces:

emit-terminal-sequence.sh: line 82: /dev/tty: No such device or address

The on-session-start.sh guard does fire, but it only suggests brew install jq / apt install jq, so on Windows there is no actionable next step. Putting the guard in build-payload.sh as this PR does also covers the other hook entry points, which currently have no guard and fail on every tool call.

Workaround in the meantime: drop jq.exe into ~/bin, Git Bash prepends that to PATH so no restart is needed.

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.

2 participants