diff options
Diffstat (limited to 'lib/bugs.js')
-rw-r--r-- | lib/bugs.js | 3 |
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) |