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
publish:check crashes on Windows (spawns pnpm without a shell; tar reads C: as a host) #367
pnpm run publish:check (scripts/assert-packages-publishable.mjs) crashes on Windows before checking anything:
TypeError: Cannot read properties of undefined (reading 'trim')
at run (scripts/assert-packages-publishable.mjs:52)
run() calls spawnSync("pnpm", …) without shell: true. On Windows, pnpm is pnpm.cmd, so the process never starts: result.status is null, result.stdout is undefined, and the error path itself throws. The tar calls have a second Windows problem: GNU tar under Git Bash reads C:/… tarball paths as a remote host unless --force-local is passed.
CI is unaffected, because the release workflow runs on Linux. But a maintainer can't run the pre-publish check locally on Windows. For 2.0.0 the two checks were run by hand: no workspace: specifiers, and no test artifacts in any tarball.
Fix:
spawn pnpm through the shell on win32 (or resolve pnpm.cmd);
report result.error when the spawn fails, instead of dereferencing stdout;
pass --force-local to tar on win32, or read the tarballs with a node tar library.
Activity