Replace spawn shell option with explicit shell args to avoid DEP0190 warning

This commit is contained in:
Alexander Farber 2025-12-12 12:19:20 +01:00
parent 0681c71894
commit a8ccd7b6fb
No known key found for this signature in database
5 changed files with 27 additions and 16 deletions

View file

@ -241,9 +241,12 @@ describe('handleAutoUpdate', () => {
handleAutoUpdate(mockUpdateInfo, mockSettings, '/root', mockSpawn);
expect(mockSpawn).toHaveBeenCalledWith(
'npm i -g @qwen-code/qwen-code@nightly',
expect.stringMatching(/^(bash|cmd\.exe)$/),
expect.arrayContaining([
expect.stringMatching(/^(-c|\/c)$/),
'npm i -g @qwen-code/qwen-code@nightly',
]),
{
shell: true,
stdio: 'pipe',
},
);