Skip to content

fix(setup): provide Node fallback for Git hooks - #205

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-hook-node-path
Aug 5, 2026
Merged

fix(setup): provide Node fallback for Git hooks#205
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-hook-node-path

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

VS Code and other GUI Git clients can run hooks with a restricted PATH, causing project-local rs shims to fail because node cannot be found.

This PR records the Node executable used by rs setup in the generated hook runner and appends its directory only when the hook environment has no active Node. It preserves the current Node environment, safely quotes POSIX paths, and converts Windows paths for Git Bash.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6add72
Status: ✅  Deploy successful!
Preview URL: https://0cbbec07.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-fix-hook-node-pat.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan marked this pull request as ready for review August 5, 2026 14:22
@chenjiahan
chenjiahan merged commit fc8cfac into main Aug 5, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/fix-hook-node-path branch August 5, 2026 14:26
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