From d616e613c857176a0cfb3f5f0dc9485b11326344 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Fri, 12 Dec 2025 16:26:38 -0500 Subject: [PATCH] fix(update): suppress Node deprecation warnings on Windows --- src/commands/update-command.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/commands/update-command.ts b/src/commands/update-command.ts index 5f344dcb..5cef805a 100644 --- a/src/commands/update-command.ts +++ b/src/commands/update-command.ts @@ -236,8 +236,13 @@ async function performNpmUpdate( const performUpdate = (): void => { // On Windows, use shell with full command string to avoid deprecation warning + // Also suppress Node deprecation warnings that may come from package managers const child = isWindows - ? spawn(`${updateCommand} ${updateArgs.join(' ')}`, [], { stdio: 'inherit', shell: true }) + ? spawn(`${updateCommand} ${updateArgs.join(' ')}`, [], { + stdio: 'inherit', + shell: true, + env: { ...process.env, NODE_NO_WARNINGS: '1' }, + }) : spawn(updateCommand, updateArgs, { stdio: 'inherit' }); child.on('exit', (code) => { @@ -273,7 +278,11 @@ async function performNpmUpdate( console.log(info('Clearing package cache...')); // On Windows, use shell with full command string to avoid deprecation warning const cacheChild = isWindows - ? spawn(`${cacheCommand} ${cacheArgs.join(' ')}`, [], { stdio: 'inherit', shell: true }) + ? spawn(`${cacheCommand} ${cacheArgs.join(' ')}`, [], { + stdio: 'inherit', + shell: true, + env: { ...process.env, NODE_NO_WARNINGS: '1' }, + }) : spawn(cacheCommand, cacheArgs, { stdio: 'inherit' }); cacheChild.on('exit', (code) => {