Environment
- OS: Windows 11 专业版 (25H2) x86_64
- Kernel: WIN32_NT 10.0.26200.8246
- Shell: PowerShell 7.6.0
- Volta: 2.0.2
- Node: v24.15.0
Reproduction
index.js:
console.log(process.argv)
Run:
node .\index.js "http://www.baidu.com?a=1&b=2"
Actual output:
[
'C:\\nvm4w\\nodejs\\node.exe',
'C:\\Users\\Maiii\\code\\overcook-web\\test\\index.js',
'http://www.baidu.com?a=1'
]
'b' is not recognized as an internal or external command,
operable program or batch file.
But directly invoking the real node.exe works correctly:
C:\nvm4w\nodejs\node.exe .\index.js "http://www.baidu.com?a=1&b=2"
Output:
[
'C:\\nvm4w\\nodejs\\node.exe',
'C:\\Users\\Maiii\\code\\overcook-web\\test\\index.js',
'http://www.baidu.com?a=1&b=2'
]
Expected behavior
The quoted argument should be passed through unchanged:
http://www.baidu.com?a=1&b=2
Environment
Reproduction
index.js:Run:
node .\index.js "http://www.baidu.com?a=1&b=2"Actual output:
But directly invoking the real node.exe works correctly:
Output:
Expected behavior
The quoted argument should be passed through unchanged:
http://www.baidu.com?a=1&b=2