Skip to content

Commit 455b64e

Browse files
authored
fix: pass single string command with args to spawn (#540)
1 parent 0a9cead commit 455b64e

File tree

1 file changed

+4
-1
lines changed
  • packages/vite-plugin-checker/src

1 file changed

+4
-1
lines changed

packages/vite-plugin-checker/src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ function spawnChecker(
244244
const finalBin: BuildCheckBinStr =
245245
typeof buildBin === 'function' ? buildBin(userConfig) : buildBin
246246

247-
const proc = spawn(...finalBin, {
247+
const [command, args] = finalBin
248+
const commandWithArgs = [command, ...args].join(' ')
249+
250+
const proc = spawn(commandWithArgs, {
248251
cwd: process.cwd(),
249252
stdio: 'inherit',
250253
env: localEnv,

0 commit comments

Comments
 (0)