mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3163] [MERGED] fix: spawn node and git without cmd shell in server build scripts #5824
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5824
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3163
Author: @kolacheee
Created: 7/2/2026
Status: ✅ Merged
Merged: 7/3/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/server-build-execpath-no-shell📝 Commits (1)
5b99f40fix: spawn node and git without cmd shell in server build scripts📊 Changes
2 files changed (+4 additions, -3 deletions)
View changed files
📝
packages/server/scripts/build.mjs(+4 -2)📝
packages/server/scripts/write-build-meta.mjs(+0 -1)📄 Description
Linked issue
Closes #3162
Why this change
C:\Program Files\nodejs),pnpm checkandpnpm buildfail onstaging: the server build script spawnsprocess.execPaththroughcmd.exe(spawnSyncwithshell: true), which concatenates the command line unquoted and splits the path at the space —'C:\Program' is not recognized as an internal or external command. This breaks the baseline validation command for every Windows contributor on a default Node install. Introduced with the build script in #3157; not present onmain.What changed
packages/server/scripts/build.mjs: therun()helper now accepts a per-callshelloverride, and thewrite-build-meta.mjsstep passesshell: false. Spawningnode.exedirectly needs no shell (it's a real executable, not a.cmdshim), and without a shell the args are passed verbatim — which also fixes the same breakage for repos cloned into paths containing spaces. Thetscinvocation keeps the shell, which it genuinely needs on Windows to resolve the.cmdshim.packages/server/scripts/write-build-meta.mjs: dropped the unnecessaryshell: process.platform === "win32"from theexecFileSync("git", ...)call — same root pattern in the same build path.gitis a real executable and needs no shell; the shell also triggered Node'sDEP0190deprecation warning (unescaped args) on every Windows server build.Scope note: the other spawn call sites were checked for the same pattern.
packages/client/scripts/build.mjsshares therun()helper but only invokestsc/vite(bare.cmdshim names that require the shell on Windows — itsDEP0190warning is unavoidable without larger changes, and it works).run-tests.mjsandcheck-impeccable-context.mjsalready spawnprocess.execPathwithout a shell, which is the correct pattern this PR aligns with.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What was already exercised while preparing this PR (agent-run on Windows 11, Node in
C:\Program Files\nodejs— the affected environment; re-verify yourself before ticking boxes above):pnpm --filter @marinara-engine/server buildexited 1 with'C:\Program' is not recognizedaftertsccompleted.pnpm --filter @marinara-engine/server buildexits 0 anddist/config/build-meta.jsonis written with the correct commit hash, confirmingwrite-build-meta.mjsactually ran.pnpm check(impeccable check + lint + production build of all packages) exits 0.pnpm guard:installer-artifactsexits 0.Still needs manual verification by a human:
pnpm checkpasses on this branch on your own machine (ideally Windows with Node underC:\Program Files).shelldefault is unchanged there, so no behavior difference is expected, but it hasn't been exercised in this session.Docs and release impact
No docs impact expected: internal build-tooling fix with no user-visible behavior change and no version bump.
UI evidence (if applicable)
Not applicable — build tooling only, no UI change.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.