1 # bin-version-check [![Build Status](https://travis-ci.org/sindresorhus/bin-version-check.svg?branch=master)](https://travis-ci.org/sindresorhus/bin-version-check)
3 > Check whether a binary version satisfies a [semver range](https://github.com/isaacs/node-semver#ranges)
5 Useful when you have a thing that only works with specific versions of a binary.
11 $ npm install --save bin-version-check
19 curl 7.30.0 (x86_64-apple-darwin13.0)
23 var binVersionCheck = require('bin-version-check');
25 binVersionCheck('curl', '>=8', function (err) {
28 //=> InvalidBinVersion: curl 7.30.0 does not satisfy the version requirement of >=8
37 $ npm install --global bin-version-check
41 $ bin-version-check --help
44 bin-version-check <binary> <semver-range>
48 curl 7.30.0 (x86_64-apple-darwin13.0)
49 $ bin-version-check curl '>=8'
50 curl 7.30.0 does not satisfy the version requirement of >=8
52 Exits with code 0 if the semver range is satisfied and 1 if not
58 MIT © [Sindre Sorhus](http://sindresorhus.com)