Return the match, not the request.

While looking for the moon,
I saw only Chuang Tzu's finger.
This commit is contained in:
isaacs
2010-12-03 13:20:36 -08:00
parent db738f325c
commit ba10afd2ee

View File

@@ -37,7 +37,7 @@ function remotePackages (args, index, doVersion, doTag
, pieces = (uniqueMatch || name).split("@")
, pkgname = pieces[0]
, extras = []
if (unique && !addTag && !addVer) return cb(null, [name])
if (unique && !addTag && !addVer) return cb(null, [uniqueMatch])
if (d[pkgname] && (addTag || addVer)) {
if (d[pkgname].versions && addVer) {
extras = extras.concat(Object.keys(d[pkgname].versions))