Skip to content

fix(hooks): use cmd-compatible quoting for SessionStart run-hook#630

Open
stablegenius49 wants to merge 1 commit intoobra:mainfrom
stablegenius49:pr-factory/issue-529-fix-windows-hook-quoting
Open

fix(hooks): use cmd-compatible quoting for SessionStart run-hook#630
stablegenius49 wants to merge 1 commit intoobra:mainfrom
stablegenius49:pr-factory/issue-529-fix-windows-hook-quoting

Conversation

@stablegenius49
Copy link

@stablegenius49 stablegenius49 commented Mar 6, 2026

Summary

  • replace the single-quoted SessionStart hook command with escaped double quotes in hooks/hooks.json
  • preserve spaces in CLAUDE_PLUGIN_ROOT paths while remaining compatible with Windows cmd.exe

Validation

  • python3 -m json.tool hooks/hooks.json

Closes #529

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 41cd46e0-688b-4d66-9caf-1cf8b147b010

📥 Commits

Reviewing files that changed from the base of the PR and between e4a2375 and c929ea2.

📒 Files selected for processing (1)
  • hooks/hooks.json

📝 Walkthrough

Walkthrough

This change updates the hook command string in hooks.json by modifying how the path to run-hook.cmd is quoted and escaped, addressing Windows path handling in the SessionStart hook invocation.

Changes

Cohort / File(s) Summary
Hook Configuration Update
hooks/hooks.json
Modified command string quoting from single quotes to escaped double quotes to properly handle Windows path execution for the SessionStart hook invocation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 A quote escaped, a path now clear,
Windows hooks shall have no fear—
Double-quoted, rightly blessed,
The SessionStart shall pass its test! 🪝✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing Windows cmd-compatible quoting for the SessionStart hook command in hooks.json, which directly addresses the PR's objective.
Description check ✅ Passed The description explains the change (replacing single quotes with escaped double quotes), the motivation (Windows cmd compatibility and preserving spaces in paths), and provides validation steps.
Linked Issues check ✅ Passed The PR changes hooks.json to use escaped double quotes for the SessionStart run-hook command, directly addressing issue #529's requirement to fix Windows cmd.exe compatibility that was regressed in v4.3.1.
Out of Scope Changes check ✅ Passed The PR makes a single focused change to hooks.json affecting only the SessionStart command quoting, which is directly within the scope of issue #529.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

IgorTavcar added a commit to IgorTavcar/superpowers that referenced this pull request Mar 9, 2026
…bra#630)

Single quotes prevent variable expansion in some shell contexts.

Upstream PR: obra#630

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

● v4.3.1 regressed Windows hook fix from PR #331

1 participant