flows.json (6.8 KB)
myText.txt (7.2 KB)
I ran into an issue I didn't have in previous version of Node-RED (3.1.5).
When using the exec node in spawn mode, if an appended parameters via the payload contains a space in the path for a file, the calling thrid party program errors out. Yes, I have double-quotes surrounding said path.
Now for obvious reason, I cannot provide the whole setup and third party program but I reproduce the undesired behavior with the common Windows cmd type.
Save the attached myText.txt file to the following path: "C:\Test Space" and "C:\TestSpace".
Using the attached flow, simply trigger each one. Notice that each execute as expected and produce the content of the text file, as seen in the debug node named TOP.
In each exec node named type, change the output from exec mode to spawn mode.
Again trigger each one. Notice that the first one will error out with:
The system cannot find the file specified.
Error occurred while processing: C:\Test.
And the second one will execute properly. If you look at the debug node named Params, notice that the extra paramters are passed properly. If you try the same param directly fom a CMD window calling the type command, it works fine.
Like I said, the type command is not what I use in my real flow but I end-up with the same problem. I soon as I remove the space in the path, it starts working like a charm.