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
This commit is contained in:
kaitranntt
2025-12-12 16:21:34 -05:00
parent 466cb0ad8b
commit 8c1b8e49ae
+2
View File
@@ -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) => {