Skip to content
forked from kevva/bin-check

Check if a binary is working by checking its exit code

License

Notifications You must be signed in to change notification settings

XhmikosR/bin-check

 
 

Repository files navigation

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

About

Check if a binary is working by checking its exit code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%