Fix: skip POSIX hook guard on Windows installs (#452) - #453
Draft
abdulwahabone wants to merge 2 commits into
Draft
Fix: skip POSIX hook guard on Windows installs (#452)#453abdulwahabone wants to merge 2 commits into
abdulwahabone wants to merge 2 commits into
Conversation
PowerShell rejects the `[ ! -f ... ] ||` guard at parse time, so Codex hooks generated by `npx impeccable install` on Windows never ran. Emit the direct `node "PATH"` invocation there; POSIX output is unchanged. AI-assisted (Cursor). Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile SummaryThis change replaces the Windows-incompatible POSIX hook-file guard with a Node-based wrapper while retaining the existing POSIX form on other platforms. The generated wrapper was exercised with missing and existing hook files, including paths containing spaces. Missing hooks exited successfully without output; existing hooks preserved stdout, stderr, and exit status 23. The isolated skills CLI suite completed with 67 passing tests and 8 skipped tests. Confidence Score: 5/5
What T-Rex did
Reviews (2): Last reviewed commit: "Keep the missing-file no-op in Windows-g..." | Re-trigger Greptile |
Greptile review on #453: project hook manifests are committable, so a bare `node "PATH"` written on Windows loses the silent no-op when a POSIX teammate without the skill consumes it. Replace the bare form with a shell-agnostic `node -e` existence guard that parses in PowerShell, cmd.exe, and sh, and forwards the hook's exit code. AI-assisted (Cursor). Co-authored-by: Cursor <cursoragent@cursor.com>
abdulwahabone
marked this pull request as draft
July 30, 2026 10:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #452.
npx impeccable installon Windows wrote the POSIX[ ! -f ... ] ||guard into Codex hook commands; PowerShell rejects it at parse time (ParserError: Missing type name after '['), so both hooks never ran.guardHookCommand()now emits the directnode "PATH"invocation onwin32(the form the bundled plugin manifests already use) and keeps the guard elsewhere.Validated by simulating a Windows install (faked
process.platform, project and global scope) and running the generated commands in PowerShell 7.6.4: old form reproduces the exact ParserError, new form exits 0. macOS installer output is byte-identical;tests/skills-cli.test.jspasses. Generated provider output intentionally untouched.AI assistance was used for the reproduction and fix.
Made with Cursor