Skip to content

Commit 38a4bfe

Browse files
committed
smoketests: wrap args in quotes on Windows in npm
1 parent cab62ec commit 38a4bfe

File tree

1 file changed

+1
-1
lines changed
  • smoketests/tests/__helpers

1 file changed

+1
-1
lines changed

smoketests/tests/__helpers/npm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { asyncSpawn, AsyncSpawnOptions, AsyncSpawnResult } from './asyncSpawn.js
55
export function npm(cwd: string, args: string[], options?: AsyncSpawnOptions) {
66
const isWindows = /^win/.test(process.platform);
77
const command = isWindows ? 'npm.cmd' : 'npm';
8-
return asyncSpawn(command, args, {
8+
return asyncSpawn(command, isWindows ? args.map((a) => `"${a}"`) : args, {
99
...options,
1010
shell: isWindows,
1111
cwd,

0 commit comments

Comments
 (0)