javascript - Spawn child process escaping the quotes -
i'm trying add arguments require string quoted, spawn
escaping them.
code follows:
var printproc = spawn('rawprintserver.exe', ['standalone', '"rawprinter"'], { detached: true, stdio: ['ignore', out, err] });
when check task manager, can see has spawned as
rawprintserver.exe standalone "\"rawprinter\""
whereas need
rawprintserver.exe standalone "rawprinter"
windowsverbatimarguments
var printproc = spawn('rawprintserver.exe', ['standalone', '"rawprinter"'], { detached: true, stdio: ['ignore', out, err], windowsverbatimarguments: true });
found mentioned on bug (quotes not handled correctly when child_process.spawn() parses args) don't think it's documented.
Comments
Post a Comment