rannn505 / child-shell

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

fix: prevent emitting error event twice #83

Open albanm opened 5 years ago

albanm commented 5 years ago

On my linux system where powershell is absent I had an uncaught exception. This is because the this.pid check emitted an error, then the proc.once('error') emitted another one. I added a simple check to prevent this from happening.