diff options
Diffstat (limited to 'lib/bugs.js')
-rw-r--r-- | lib/bugs.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/bugs.js b/lib/bugs.js index 0d5460ac9..3f9de1231 100644 --- a/lib/bugs.js +++ b/lib/bugs.js @@ -3,22 +3,22 @@ module.exports = bugs bugs.usage = "npm bugs <pkgname>" +var exec = require("./utils/exec.js") + , npm = require("./npm.js") + , registry = npm.registry + , log = require("npmlog") + bugs.completion = function (opts, cb) { if (opts.conf.argv.remain.length > 2) return cb() - registry.get("/-/short", null, 60000, function (er, list) { + registry.get("/-/short", 60000, function (er, list) { return cb(null, list || []) }) } -var exec = require("./utils/exec.js") - , registry = require("./utils/npm-registry-client/index.js") - , npm = require("./npm.js") - , log = require("npmlog") - function bugs (args, cb) { if (!args.length) return cb(bugs.usage) var n = args[0].split("@").shift() - registry.get(n, "latest", 3600, function (er, d) { + registry.get(n + "/latest", 3600, function (er, d) { if (er) return cb(er) var bugs = d.bugs , repo = d.repository || d.repositories |