Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@xhmikosr/bin-check

XhmikosR799.5kMIT7.0.3

Check if a binary is working

binary, check, executable, test

readme

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