Skip to content

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

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

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

Conversation

@soridalac

Copy link
Copy Markdown
Contributor

What does this PR do?

Summary

  • Resolve npm via which and reject if it resolves to CWD in the sf-doctor diagnostic hook
  • 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 auth diagnostics run normally from a clean directory
  • Unit tests pass (89 passing)

What issues does this PR fix or reference?

@W-23814642@

@WillieRuemmele

Copy link
Copy Markdown
Contributor

QA Notes


✅ :

plugin-auth.mov

@WillieRuemmele
WillieRuemmele merged commit 778ee7b into main Aug 13, 2026
15 checks passed
@WillieRuemmele
WillieRuemmele deleted the sl/W-23814642 branch August 13, 2026 16:55
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