Skip to content

fix: detect Windows npm CLI shims#118

Open
adamkane wants to merge 1 commit into
vercel:mainfrom
adamkane:codex/fix-windows-cli-detection
Open

fix: detect Windows npm CLI shims#118
adamkane wants to merge 1 commit into
vercel:mainfrom
adamkane:codex/fix-windows-cli-detection

Conversation

@adamkane

Copy link
Copy Markdown

Summary

  • skip npm's extensionless POSIX shim when resolving CLIs on Windows
  • invoke .cmd and .bat launchers through a quoted cmd.exe command string
  • keep direct execution for native binaries and add Windows regression coverage

This prevents the session-start profiler from repeatedly reporting an installed Vercel CLI as missing. It also avoids Node's deprecated shell: true plus argument-array form.

Fixes #89
Fixes #95
Fixes #105

Verification

  • bun test hooks/session-start-profiler-platform.test.ts (4 passed)
  • bun run typecheck
  • bun run build:hooks
  • live Windows hook smoke test with npm-installed Vercel CLI 56.2.0 (no missing/outdated warning)

Existing upstream baseline failures

The broader Windows suite was also attempted. Untouched upstream/main currently fails build:from-skills:check and validate for 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.

@adamkane

Copy link
Copy Markdown
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants