diff options
author | isaacs <i@izs.me> | 2010-05-10 11:43:37 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-05-10 11:49:54 +0400 |
commit | 24c9f439796fe0c2e5545bc1514ce161602e012f (patch) | |
tree | 69b888ae9939793cde70e6a3d1623019065955f7 /lib | |
parent | ca139022d648ae63f1b806ac3ae0aaeba9f20c79 (diff) |
Also treat "." as a local pathname
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/install.js b/lib/install.js index 53b0b1f11..b79becc02 100644 --- a/lib/install.js +++ b/lib/install.js @@ -87,7 +87,10 @@ function registryInstall (pkglist, cb) { } // it's a local thing or a url if it has a / in it. - if (pkg.indexOf("/") !== -1) return cache.add(pkg, Continue) + if (pkg.indexOf("/") !== -1 || pkg === ".") { + log(pkg, "install local") + return cache.add(pkg, Continue) + } // now we know it's not a URL or file, // so handle it like a tag, version, or range. @@ -119,6 +122,7 @@ function registryInstall (pkglist, cb) { return registry.get(name, function (er, data) { if (!er && !data) er = new Error("not found in registry: "+name) if (er) return cb(er) + if (!data._id) data._id = name npm.set(data) seen[pkg] = false return F(pkg) |