fix: detect Windows npm CLI shims - #118
Conversation
|
@Melkeydev Could you please review this Windows CLI detection fix when you have a chance? The focused platform tests, hook build, and typecheck pass; the unrelated upstream baseline failures are documented in the PR description. |
|
Confirming this is still live on the current build — plugin 0.45.1 (the version currently vendored into Environment
Repro, running 0.45.1's own resolution logic verbatim
Ruling out the obvious alternative: this is not the 3 s timeout. Verified that this PR's approach fixes it I applied both changes from this PR to my local 0.45.1 cache and ran the actual hook end-to-end (same stdin payload, only the module swapped): Impact worth flagging: |
Summary
.cmdand.batlaunchers through a quotedcmd.execommand stringThis prevents the session-start profiler from repeatedly reporting an installed Vercel CLI as missing. It also avoids Node's deprecated
shell: trueplus argument-array form.Fixes #89
Fixes #95
Fixes #105
Verification
bun test hooks/session-start-profiler-platform.test.ts(4 passed)bun run typecheckbun run build:hooksExisting upstream baseline failures
The broader Windows suite was also attempted. Untouched
upstream/maincurrently failsbuild:from-skills:checkandvalidatefor stale template includes/command catalog rules; the full suite reports the same unrelated template and Windows path failures. This PR changes only the profiler source, generated hook, and its platform regression test.