fix(setup): stop Node's DEP0190 warning when npm runs on Windows (#1057)

Windows runs npm.cmd through a shell, and passing an argument array with `shell: true` is deprecated in Node 24 (DEP0190). Every `npm run doctor` and every Pinokio install on Windows printed the warning. npmProcessSpec now takes the npm arguments and, on Windows, joins them into the command string; the arguments are fixed subcommands (`--version`, `ci`). Unix behavior is unchanged.
This commit is contained in:
quanticsoul4772 authored and GitHub committed 2026-10-16 15:28:39 -07:00
1 parent ec7823daad
commit 3c3ea269a9
4 files changed
+31 -12

No files matched your search

+14 -4
View File
@@ -69,12 +69,22 @@ test('placeholder values are never counted as configured credentials', () => {
});
test('doctor selects a Windows-safe npm process without changing Unix behavior', () => {
assert.deepEqual(npmProcessSpec('win32'), {
command: 'npm.cmd',
// Windows passes no argument array with shell: true (Node DEP0190).
assert.deepEqual(npmProcessSpec(['ci'], 'win32'), {
command: 'npm.cmd ci',
args: [],
shell: true,
});
assert.deepEqual(npmProcessSpec('darwin'), { command: 'npm', shell: false });
assert.deepEqual(npmProcessSpec('linux'), { command: 'npm', shell: false });
assert.deepEqual(npmProcessSpec(['--version'], 'darwin'), {
command: 'npm',
args: ['--version'],
shell: false,
});
assert.deepEqual(npmProcessSpec(['ci'], 'linux'), {
command: 'npm',
args: ['ci'],
shell: false,
});
});
test('doctor recognizes every OpenSky OAuth keychain alias used by dev-fresh', () => {