Skip to content

W-23814642- resolve npm from PATH only, excluding CWD - #1255

Merged
soridalac merged 1 commit into
mainfrom
sl/W-23814642
Aug 13, 2026
Merged

W-23814642- resolve npm from PATH only, excluding CWD#1255
soridalac merged 1 commit into
mainfrom
sl/W-23814642

Conversation

@soridalac

@soridalac soridalac commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Summary

  • Resolve npm via which and reject if it resolves to CWD in outdatedCliVersionCheck
  • Use execFile with the resolved absolute path instead of exec with a bare command name
  • Add { shell: true } only when the resolved path is a .cmd/.bat file

Test plan

  • Verified on Windows VM: npm.exe in CWD no longer executes via sf doctor
  • Verified on Windows VM: sf doctor diagnostics run normally from a clean directory
  • Unit tests pass (97 passing)

What issues does this PR fix or reference?

@W-23814642@

@soridalac
soridalac merged commit e8c6800 into main Aug 13, 2026
17 checks passed
@soridalac
soridalac deleted the sl/W-23814642 branch August 13, 2026 21:12
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