When I execute the (made up and ridiculous) command banana
from bash I get the following error:
bash: banana: command not found
But if I execute banana
in a child_process.spawn
in Node.js, I get the error:
net.js:624
throw new TypeError('invalid data');
^
TypeError: invalid data
at WriteStream.Socket.write (net.js:624:11)
at ChildProcess.<anonymous>
at ChildProcess.emit (events.js:107:17)
at Process.ChildProcess._handle.onexit (child_process.js:1065:12)
at child_process.js:1137:20
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3
Is there any way to get the text of the original bash error from Node.JS?