Skip to content

fix: correct cross-platform PATH splitting and dead code in executor - #1

Merged
IMRAN104 merged 2 commits into
mainfrom
claude/cross-platform-install-MTRnu
May 22, 2026
Merged

fix: correct cross-platform PATH splitting and dead code in executor#1
IMRAN104 merged 2 commits into
mainfrom
claude/cross-platform-install-MTRnu

Conversation

@IMRAN104

Copy link
Copy Markdown
Owner

Summary

  • src/resolver.ts: findOnPath() was splitting PATH using path.delimiter, which is ":" on Linux/macOS even when IS_WINDOWS is mocked to true in tests. Windows-style paths like "C:\dir" contain a literal ":" that the Linux delimiter splits on, silently breaking the PATH walk and falling through to the literal "commandcode" fallback. Fix: use IS_WINDOWS ? ";" : delimiter so the split character always matches the target platform, not the host OS. This fixes the three Windows PATH-walk resolver tests that were failing on Linux/macOS.
  • src/executor.ts: Remove the unused IS_WINDOWS import (leftover from when spawn used shell: true on Windows) and correct the JSDoc that still claimed a shell: true/false OS split.

Test plan

  • npm run build — TypeScript compiles cleanly
  • npm test — all 108 tests pass (including the 3 Windows PATH-walk tests that were previously failing on Linux/macOS)
  • node scripts/smoke.mjs — version banner prints, no deprecation warnings
  • CI matrix passes on ubuntu-latest, macos-latest, windows-latest × Node 20/22

https://claude.ai/code/session_01Qkq1tdzF4drY3DSg61CSAx


Generated by Claude Code

claude added 2 commits May 22, 2026 09:10
resolver.ts: findOnPath() was splitting PATH using path.delimiter (which
is ":" on Linux/macOS even when IS_WINDOWS is true in tests). Windows
paths like "C:\dir" contain a literal ":" that the Linux delimiter would
split on, causing the PATH walk to silently fail and fall through to the
literal "commandcode" fallback. Fix: use IS_WINDOWS ? ";" : delimiter so
the split character always matches the target platform, not the host OS.
This makes the three Windows PATH-walk resolver tests pass on Linux/macOS.

executor.ts: remove the unused IS_WINDOWS import (leftover from when
spawn used shell:true on Windows) and correct the JSDoc that still
claimed shell:true/false split by OS.

https://claude.ai/code/session_01Qkq1tdzF4drY3DSg61CSAx
Removes stale "peer": true metadata fields from several lockfile entries
(npm v10 no longer emits this field for non-peer deps).

https://claude.ai/code/session_01Qkq1tdzF4drY3DSg61CSAx
@kilo-code-bot

kilo-code-bot Bot commented May 22, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • package-lock.json
  • src/executor.ts
  • src/resolver.ts

Reviewed by nemotron-3-super-120b-a12b-20230311:free · 174,723 tokens

@IMRAN104
IMRAN104 merged commit fb2923d into main May 22, 2026
7 checks passed
@IMRAN104
IMRAN104 deleted the claude/cross-platform-install-MTRnu branch May 22, 2026 14:15
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.

2 participants