Check if a binary is working by checking its exit code
Clone or download
Latest commit 7c9a712 Jun 20, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fixtures Tweaks Jun 2, 2016
.editorconfig Meta tweaks Jun 20, 2017
.gitattributes Tweaks Jun 2, 2016
.gitignore Small tweaks Oct 4, 2014
.travis.yml Meta tweaks Jun 20, 2017
index.js Add `.sync` method Jun 20, 2017
license Meta tweaks Jun 20, 2017
package.json 4.1.0 Jun 20, 2017
readme.md Add `.sync` method Jun 20, 2017
test.js Add `.sync` method Jun 20, 2017

readme.md

bin-check Build Status

Check if a binary is working by checking its exit code

Install

$ npm install 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 for a boolean.

binCheck.sync(binary, [arguments])

Returns 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