Card parsing fails for fast git child process exit
Closed this issue · 2 comments
If the spawned git child process exits too fast, the event handler for "exit" may trigger before the "stdout", causing commit message parsing to fail because the data buffer is null. There seems to be a race condition involved, as the Trello script sometimes succeeds and sometimes (often) not.
Using the "close" event instead of "exit" seems to solve the problem for me (Ubuntu VM on Cloud9), but I don't know if that might have unintended side effects.
Relevant SOO thread: http://stackoverflow.com/questions/26446791/node-read-spawn-stderr-stdout-after-quick-exit-event
Regards
Norbert
Hey @schoepke! I’m a bit lost on this issue — this module doesn’t use git in normal operations nor does it spawn child processes.
Can you clarify, and perhaps submit a minimal working example of the bug?
Thanks,
Andrew
Hi Andrew,
you are right, I followed a method to connect git commits with Trello cards (described here: http://joelherber.com/connect-gitlab-to-trello/) which just uses your package. But the bug I describe come from a custom script that is not part of the node-trello project.
Sorry for the confusion. SZtill, people having the same problem might end up here looking for a solution (which was pretty hard to find).
regards
Norbert