diff options
author | isaacs <i@izs.me> | 2010-10-22 04:32:20 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-10-22 04:32:20 +0400 |
commit | 5e14323c180d6988b48925bed6c35667fdfc8913 (patch) | |
tree | 88392df440d5fde2d043fd654c27df56727f84b1 /cli.js | |
parent | 9438ef79356a02b19c74420be9f7083de80f3ff0 (diff) |
Don't die as quickly when npm's package.json is missing
Diffstat (limited to 'cli.js')
-rwxr-xr-x | cli.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -58,7 +58,7 @@ if (printVersion) { var semver = require("./lib/utils/semver") , nodeVer = process.version , reqVer = npm.nodeVersionRequired -if (!semver.satisfies(nodeVer, reqVer)) { +if (reqVer && !semver.satisfies(nodeVer, reqVer)) { var badNodeVersion = new Error( "npm doesn't work with node " + nodeVer + "\nRequired: node@" + reqVer) throw badNodeVersion |