bin-check
Advanced tools
Comparing version 0.1.3 to 0.1.4
'use strict'; | ||
var executable = require('executable'); | ||
var spawn = process.platform === 'win32' ? require('win-spawn') : require('child_process').spawn; | ||
var spawn = require('win-spawn'); | ||
@@ -42,3 +42,3 @@ /** | ||
bin.stdout.on('data', function (data) { | ||
msg = data; | ||
msg += data; | ||
}); | ||
@@ -45,0 +45,0 @@ |
{ | ||
"name": "bin-check", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Check if a binary is working", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,4 +0,4 @@ | ||
# bin-check [![Build Status](https://travis-ci.org/kevva/bin-check.png?branch=master)](https://travis-ci.org/kevva/bin-check) | ||
# bin-check [![Build Status](https://travis-ci.org/kevva/bin-check.svg?branch=master)](https://travis-ci.org/kevva/bin-check) | ||
> Check if a binary is working in Node.js by checking its exit code. | ||
> Check if a binary is working by checking its exit code | ||
@@ -8,3 +8,3 @@ ## Install | ||
```bash | ||
npm install bin-check | ||
$ npm install --save bin-check | ||
``` | ||
@@ -17,3 +17,7 @@ | ||
binCheck('/bin/sh', '--version', function (err, works, msg) { | ||
binCheck('/bin/sh', ['--version'], function (err, works, msg) { | ||
if (err) { | ||
throw err; | ||
} | ||
console.log(msg); | ||
@@ -36,2 +40,2 @@ // => GNU bash, version 3.2.51(1)-release-(x86_64-apple-darwin13) | ||
[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](https://github.com/kevva) | ||
MIT © [Kevin Mårtensson](https://github.com/kevva) |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
39
0
2494