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
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2014-07-17 04:13:50 +0400
committerForrest L Norvell <forrest@npmjs.com>2014-07-17 04:15:31 +0400
commit7dab64e5faa8d2af9bd86a36efa98dead789f7f6 (patch)
treecc9a5df1cf8885008c93f2606ee10af6e7e068be /lib/bugs.js
parenta3a85dd004c9245a71ad2f0213bd1a9a90d64cd6 (diff)
use npm-package-arg instead of split
Diffstat (limited to 'lib/bugs.js')
-rw-r--r--lib/bugs.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bugs.js b/lib/bugs.js
index 41f1386b0..16744cd5c 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -9,6 +9,7 @@ var npm = require("./npm.js")
, opener = require("opener")
, path = require("path")
, readJson = require("read-package-json")
+ , npa = require("npm-package-arg")
, fs = require("fs")
, mapToRegistry = require("./utils/map-to-registry.js")
@@ -24,7 +25,7 @@ bugs.completion = function (opts, cb) {
}
function bugs (args, cb) {
- var n = args.length && args[0].split("@").shift() || '.'
+ var n = args.length && npa(args[0]).name || '.'
fs.stat(n, function (er, s) {
if (er && er.code === "ENOENT") return callRegistry(n, cb)
else if (er) return cb (er)