You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codev doctor: warn on native Windows when npm or pnpm script-shell is not set to Git Bash #1945
On native Windows, npm and pnpm run package scripts through the Windows command prompt unless script-shell is set. A package script that names a POSIX shell script then fails with a message that points nowhere near the cause:
'scripts' is not recognized as an internal or external command
This repository's root build script starts with scripts/check-main-fresh.sh, so the failure hits pnpm build, pnpm local-install, and porch's build check (porch runs the check in Git Bash, but npm then starts the package script in its own shell).
npm and pnpm store the setting separately. On 2026-11-23 a Node reinstall reset npm's value while pnpm's survived, and a builder's porch done failed its build check in under a second for that reason. The same error cost time twice more earlier in the week.
codev doctor checks nothing about script-shell today.
Fix
codev doctor, on native Windows only: read script-shell for npm and for pnpm (whichever of the two is installed). When either is unset or does not point at an existing Git Bash, report a warning, not a failure, and print the exact command to set it for that tool, using the Git Bash path doctor already resolves.
A warning because an unset value only breaks projects whose package scripts need a POSIX shell; an adopter whose scripts run under the command prompt is not broken.
Unit tests for the doctor check with the config lookups injected: both set, npm unset, pnpm unset, a value pointing at a missing file, one tool not installed, and a non-Windows platform (check skipped).
Manual on native Windows: unset npm's value, run codev doctor, see the warning and the command; set it, see it clear.
The skill copies stay identical to each other.
Out of scope
Having porch pass the setting to npm itself when it runs a check, so builders do not depend on machine configuration. That changes behaviour for adopters whose scripts assume the command prompt and needs its own decision.
Activity