rannn505 / child-shell

Node.js bindings 🔗 for shell
http://rannn505.github.io/child-shell/
MIT License
301 stars 71 forks source link

invoke() cannot be resolved in some cases #128

Open hphuong209 opened 3 years ago

hphuong209 commented 3 years ago

The output of the invoked commands may be concatenated to the output of the EOI writing command. In some situations, the chunk passed in the _write() function contains not only the EOI string but also the output of the previously executed command. This issue will make the invoke function is stuck and never be resolved. Instead of comparing the chunk with the EOI string, I suggest checking if the chunk containing the EOI string.

juancarlosgarcia-arg commented 3 years ago

Guys. i was having the exact same problem randomly. I think this fix will be really helpful. Do you know when it will be integrated in Master Branch?