Skip to content

Commit

Permalink
Fix npm#2033 Always accept url deps as valid
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 12, 2012
1 parent 4bea5b0 commit 6a8002f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/utils/read-installed.js
Expand Up @@ -94,6 +94,7 @@ var npm = require("../npm.js")
, semver = require("semver")
, readJson = require("./read-json.js")
, log = require("./log.js")
, url = require("url")

module.exports = readInstalled

Expand Down Expand Up @@ -254,6 +255,8 @@ function findUnmet (obj) {
continue
}
if ( typeof deps[d] === "string"
// url deps presumed innocent.
&& !url.parse(deps[d]).protocol
&& !semver.satisfies(found.version, deps[d])) {
// the bad thing will happen
log.warn(obj.path + " requires "+d+"@'"+deps[d]
Expand Down

0 comments on commit 6a8002f

Please sign in to comment.