Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDylan Greene <dylang@gmail.com>2014-07-26 16:06:15 +0400
committerForrest L Norvell <forrest@npmjs.com>2014-09-05 05:45:49 +0400
commit890411716cb570cea266bdcc11ade80596ca7477 (patch)
tree5eb37618b0a720d19706bd1b2e14200fdfeef6bd /lib
parentc8eb928207b3545c9647bdb9f095624f5cb60290 (diff)
use file:, fix tests.
Diffstat (limited to 'lib')
-rw-r--r--lib/cache/add-local.js2
-rw-r--r--lib/install.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/cache/add-local.js b/lib/cache/add-local.js
index 3b3f523a4..4724d30ac 100644
--- a/lib/cache/add-local.js
+++ b/lib/cache/add-local.js
@@ -30,7 +30,7 @@ function addLocal (p, pkgData, cb_) {
log.error("addLocal", "Could not install %s", p)
return cb_(er)
}
- if (data && !data._fromGithub) data._from = p
+ if (data && !data._fromGithub) data._from = p.replace(process.cwd(), '.')
return cb_(er, data)
})
}
diff --git a/lib/install.js b/lib/install.js
index 3c5e253b8..2fbf88c32 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -366,7 +366,7 @@ function save (where, installed, tree, pretty, hasArguments, cb) {
catch(er) {}
if (u && u.protocol) w[1] = t.from
- if (isLocal) w[1] = 'file:///' + t.from
+ if (isLocal) w[1] = 'file:' + t.from
return w
}).reduce(function (set, k) {
var rangeDescriptor = semver.valid(k[1], true) &&
@@ -755,6 +755,7 @@ function targetResolver (where, context, deps) {
return cb(null, [])
}
+
if (data && !data._from) data._from = what
if (er && parent && parent.name) er.parent = parent.name
return cb(er, data || [])