diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-07-17 04:13:50 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-07-17 04:15:31 +0400 |
commit | 7dab64e5faa8d2af9bd86a36efa98dead789f7f6 (patch) | |
tree | cc9a5df1cf8885008c93f2606ee10af6e7e068be | |
parent | a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6 (diff) |
use npm-package-arg instead of split
-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) |