Closed
Description
require('child_process')
.spawn('cmd', ['/c', 'node "my test/__args_out.js" b c d e f'])
.stderr.addListener("data", data => {console.log(data.toString());});
fails because quotes don't seem to be recognized and parsed by child_process.spawn()
as delimiters for parameters with spaces:
Error: Cannot find module 'd:\Documents\VS Code\"my test\__args_out.js"'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Function.Module.runMain (module.js:430:10)
at startup (node.js:141:18)
at node.js:980:3
This happens on Windows platforms. I can't tell whether the above error occurs on other platforms, too.
The above code is taken from jake source.