Closed payousefi closed 6 years ago
This is an important bug fix that should be accepted as it resolves an issue with async calls
Async is very broken without this fix. I'm currently using payousefi's fork in production code. @joshkatz please merge this.
🙌🏼
Unfortunately, this causes an a fatal error when R encounters an exception:
body === "" as nothing is in stdout (it all goes to stderr) then when the callback child.on('close', ...) is called, it causes an 'unexpected end of input' error in function by JSON.parse
I think this can be fixed by https://github.com/joshkatz/r-script/pull/7
Referenced in issue #5