You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
5 months ago | |
---|---|---|
.. | ||
node_modules | 5 months ago | |
index.js | 5 months ago | |
license | 5 months ago | |
package.json | 5 months ago | |
readme.md | 5 months ago |
readme.md
bin-check 
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