kevva / bin-check

Check if a binary is working by checking its exit code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Console output might not be returned correctly.

langleyVa opened this issue · comments

Issue experienced on Linux 3.14: Variable 'msg' in https://github.com/kevva/bin-wrapper/blob/master/index.js#L145 was undefined, while the executable worked just fine.

Have attached a possibly cringe-worthy pull request that fixes the issue, though. Hope it serves to illustrate that at the core, the bug is just that we return on exit of the executable without waiting for the stdout stream to flush, possibly leaving data in the stream.

I don't know how to pull-request. Sorry.