Repository navigation
fix(create): install the default scripts on Windows - #1840
Merged
joeyguerra merged 1 commit intoOct 28, 2026
Merged
Conversation
`hubot --create` runs every npm command through the shell except the one that installs hubot-help, hubot-rules, hubot-diagnostics and the adapter. On Windows npm is `npm.cmd`, which spawnSync cannot start without a shell, so that install fails with ENOENT and nothing reports it. The generated bot then lists those scripts in external-scripts.json without having them installed. Run that command with `shell: true` and inherited stdio like the others. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🎉 This PR is included in version 14.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hubot --createon Windows creates the bot but never installs hubot-help, hubot-rules, hubot-diagnostics or the--adapterpackage. #1770 moved the npm calls inGenHubot.mjstoshell: truesonpm.cmdcan start, but this one call was left without it. Without a shell,spawnSync('npm', …)fails with ENOENT on Windows, and the only trace is an emptynpm ilog line, while the generatedexternal-scripts.jsonstill lists the three scripts.This adds
{ shell: true, stdio: 'inherit' }to that call, like the other npm calls.The test puts a fake
npmon the PATH (annpm.cmdshim on Windows) that only records its arguments, runsbin/Hubot.mjs --create, and checks that the default scripts were installed. It fails on Windows without the fix, and the Windows workflow runs it.I used Claude Code to write this change.