summaryrefslogtreecommitdiff
path: root/deps/npm/lib/view.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/view.js')
-rw-r--r--deps/npm/lib/view.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 64f5aa79c4..733cf60e5f 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -68,7 +68,12 @@ function view (args, silent, cb) {
if (!args.length) args = ['.']
var pkg = args.shift()
- var nv = npa(pkg)
+ var nv
+ if (/^[.]@/.test(pkg)) {
+ nv = npa.resolve(null, pkg.slice(2))
+ } else {
+ nv = npa(pkg)
+ }
var name = nv.name
var local = (name === '.' || !name)