tree: 0d8c7948a971808c35afa3a84487261379919ea7 [path history] [tgz]
  1. index.js
  2. license
  3. package.json
  4. readme.md
node_modules/bin-check/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