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.

readme.md 732B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # bin-check [![Build Status](https://travis-ci.org/kevva/bin-check.svg?branch=master)](https://travis-ci.org/kevva/bin-check)
  2. > Check if a binary is working by checking its exit code
  3. ## Install
  4. ```
  5. $ npm install bin-check
  6. ```
  7. ## Usage
  8. ```js
  9. const binCheck = require('bin-check');
  10. binCheck('/bin/sh', ['--version']).then(works => {
  11. console.log(works);
  12. //=> true
  13. });
  14. ```
  15. ## API
  16. ### binCheck(binary, [arguments])
  17. Returns a `Promise` for a `boolean`.
  18. ### binCheck.sync(binary, [arguments])
  19. Returns a `boolean`.
  20. #### binary
  21. Type: `string`
  22. Path to the binary.
  23. #### arguments
  24. Type: `Array`<br>
  25. Default: `['--help']`
  26. Arguments to run the binary with.
  27. ## License
  28. MIT © [Kevin Mårtensson](https://github.com/kevva)