Check if a binary is working by checking its exit code
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fixtures
.editorconfig
.gitattributes
.gitignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

bin-check Build Status

Check if a binary is working by checking its exit code

Install

$ npm install --save bin-check

Usage

const binCheck = require('bin-check');

binCheck('/bin/sh', ['--version']).then(works => {
    console.log(works);
    //=> true
});

API

binCheck(binary, [arguments])

Returns a promise that resolves to a boolean.

binary

Type: string

Path to the binary.

arguments

Type: Array
Default: ['--help']

Arguments to run the binary with.

License

MIT © Kevin Mårtensson