check-node-version
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -83,3 +83,3 @@ #!/usr/bin/env node | ||
if (err) { | ||
console.error(err.message); | ||
console.error(err.longMessage || err.message); | ||
process.exit(1); | ||
@@ -86,0 +86,0 @@ return; |
13
index.js
@@ -9,12 +9,11 @@ "use strict"; | ||
exec(command, function(err, stdin, stderr) { | ||
if (err) { | ||
var commandDescription = JSON.stringify(command); | ||
if (err || stderr) { | ||
var err = new Error("Command failed: " + commandDescription); | ||
err.longMessage = err.message + (stderr && ("\n" + stderr.trim())); | ||
err.execError = err; | ||
callback(err); | ||
} | ||
else { | ||
if (stderr.length > 0) { | ||
callback(new Error(stderr.toString())); | ||
} | ||
else { | ||
callback(null, stdin.toString().trim()); | ||
} | ||
callback(null, stdin.toString().trim()); | ||
} | ||
@@ -21,0 +20,0 @@ }); |
{ | ||
"name": "check-node-version", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Check installed versions of node and npm", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7507
150