stateful-process-command-proxy
stateful-process-command-proxy copied to clipboard
Handling child_process.spawn() parameter "windowsVerbatimArguments"
Here is a basic implementation which solve the following issue :
https://github.com/bitsofinfo/stateful-process-command-proxy/issues/17
TLDR : Under Windows, child_process.spawn() method escape process arguments and add quotes to them. This can lead to improper parameter handling by the called process.
Example: If we pass the following processCommand and processArgs parameters to the StatefulProcessCommandProxy
const processCommand = 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'
const processArgs = ['-NoProfile -ExecutionPolicy bypass']
This pull request provide a new parameter to ProcessProxy to handle this.