Skip to content

fix: pass script-shell to publish lifecycle hooks#9499

Merged
owlstronaut merged 1 commit into
release/v11from
backport/v11/9492
Jun 5, 2026
Merged

fix: pass script-shell to publish lifecycle hooks#9499
owlstronaut merged 1 commit into
release/v11from
backport/v11/9492

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 5, 2026

Backport of #9492 to release/v11.

npm run passes script-shell to @npmcli/run-script, but the three
runScript() calls in publish.js for prepublishOnly, publish, and
postpublish never did. On Windows, where users set script-shell to
bash in .npmrc, those lifecycle hooks still ran under cmd.exe while
explicit npm run calls used the configured shell.

Reads script-shell from config in #publish() and passes it to all
three calls, matching the existing pattern in run.js. Adds script-shell
to static params so it appears in npm help publish.

Fixes #9477

(cherry picked from commit 0e55f97)
@owlstronaut owlstronaut merged commit 351a309 into release/v11 Jun 5, 2026
39 checks passed
@owlstronaut owlstronaut deleted the backport/v11/9492 branch June 5, 2026 17:28
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