Check if a binary is working by checking its exit code
$ npm install --save bin-check
var binCheck = require('bin-check');
binCheck('/bin/sh', ['--version'], function (err, works) {
console.log(works);
//=> true
});Type: string
Path to the binary.
Type: array
Default: ['--help']
Commands to run the binary with.
Type: function
works is a boolean which returns true if the binary is working correctly.
MIT © Kevin Mårtensson