@xhmikosr/bin-check

7.0.3 • Public • Published

bin-check CI

Check if a binary is working by checking its exit code

Install

npm install bin-check

Usage

import binCheck from '@xhmikosr/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

Package Sidebar

Install

npm i @xhmikosr/bin-check

Weekly Downloads

6,111

Version

7.0.3

License

MIT

Unpacked Size

3.59 kB

Total Files

4

Last publish

Collaborators

  • xhmikosr