mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 14:16:43 +00:00
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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user