Skip to content

fix: use execFile instead of exec for npm calls-W-23661850 - #1532

Open
soridalac wants to merge 1 commit into
mainfrom
sl/W-23661850
Open

fix: use execFile instead of exec for npm calls-W-23661850#1532
soridalac wants to merge 1 commit into
mainfrom
sl/W-23661850

Conversation

@soridalac

@soridalac soridalac commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Summary

  • Use execFile instead of exec for npm shell calls in diagnostics hook
  • exec spawns a shell (cmd.exe on Windows), which resolves commands from CWD before PATH
  • Both plugin-info and plugin-auth fixes are required — sf doctor triggers diagnostics hooks in both plugins

Test plan

  • Existing unit tests pass
  • Verified on Windows VM — CWD-local npm.cmd no longer executes
  • Verified on macOS — sf doctor works normally

What issues does this PR fix or reference?

plugin-info PR: salesforcecli/plugin-info#1246
@W-23661850@

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.

1 participant