From 883cd7da9511271459d56265b1f41bac14c6f038 Mon Sep 17 00:00:00 2001 From: NoahLan <6995syu@163.com> Date: Tue, 17 Mar 2026 12:23:28 +0800 Subject: [PATCH] fix: Fix issue where commands could not be executed correctly when they contained spaces --- internal/node-utils/scripts/build.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/node-utils/scripts/build.mjs b/internal/node-utils/scripts/build.mjs index c38b4914c..9928e8dbd 100644 --- a/internal/node-utils/scripts/build.mjs +++ b/internal/node-utils/scripts/build.mjs @@ -22,7 +22,11 @@ const steps = [ for (const args of steps) { const [command, ...commandArgs] = pnpmCommand; - const result = spawnSync(command, [...commandArgs, ...args], { + let cmd = command + if(cmd.includes(" ")) { + cmd = `"${command}"` + } + const result = spawnSync(cmd, [...commandArgs, ...args], { shell: true, stdio: 'inherit', });