From 8c1b8e49aecf3b7901c3ddf8b2f1ba69233671ec Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Fri, 12 Dec 2025 16:21:34 -0500 Subject: [PATCH] fix(update): add shell option for Windows npm/cache spawn On Windows, spawn needs shell:true to find npm.cmd. Without it, ENOENT error occurs causing update failure. Fixes #85 --- src/commands/update-command.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/update-command.ts b/src/commands/update-command.ts index 406dd9df..38225ca1 100644 --- a/src/commands/update-command.ts +++ b/src/commands/update-command.ts @@ -235,6 +235,7 @@ async function performNpmUpdate( const performUpdate = (): void => { const child = spawn(updateCommand, updateArgs, { stdio: 'inherit', + shell: process.platform === 'win32', }); child.on('exit', (code) => { @@ -270,6 +271,7 @@ async function performNpmUpdate( console.log(info('Clearing package cache...')); const cacheChild = spawn(cacheCommand, cacheArgs, { stdio: 'inherit', + shell: process.platform === 'win32', }); cacheChild.on('exit', (code) => {