Comparing version 0.2.1 to 0.3.0
11
index.js
@@ -12,5 +12,11 @@ var cp = require('child_process'); | ||
if (error || stderr || stdout === '' || stdout.indexOf('\\') === -1) { | ||
return cb(new Error('Could not find ' + name + ' on your system')); | ||
cp.exec('for %i in (' + name + '.exe) do @echo. %~$PATH:i', function (error, stdout, stderr) { //windows xp | ||
if (error || stderr || stdout === '' || stdout.indexOf('\\') === -1) { | ||
return cb(new Error('Could not find ' + name + ' on your system')); | ||
} | ||
return cb(null, stdout); | ||
}); | ||
} else { | ||
return cb(null, stdout); | ||
} | ||
return cb(null, stdout); | ||
}); | ||
@@ -27,2 +33,1 @@ } | ||
}; | ||
{ | ||
"name": "whereis", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"author": "Vincent Voyer vincent.voyer@gmail.com", | ||
@@ -16,3 +16,3 @@ "description": "Which/Whereis easy helper, find if a program exists", | ||
"devDependencies": { | ||
"tap": "^0.4.9" | ||
"tap": "^0.4.12" | ||
}, | ||
@@ -19,0 +19,0 @@ "scripts": { |
@@ -1,5 +0,5 @@ | ||
node-whereis | ||
node-whereis [![Dependency Status](https://david-dm.org/vvo/node-whereis.svg)](https://david-dm.org/vvo/node-whereis) [![devDependency Status](https://david-dm.org/vvo/node-whereis/dev-status.svg)](https://david-dm.org/vvo/node-whereis#info=devDependencies) | ||
============ | ||
Simply get the first path to a bin on any system | ||
Simply get the first path to a bin on any system. | ||
@@ -6,0 +6,0 @@ ```js |
3664
82