diff options
Diffstat (limited to 'lib/ping.js')
-rw-r--r-- | lib/ping.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ping.js b/lib/ping.js index 9a07d93a5..23b18bfba 100644 --- a/lib/ping.js +++ b/lib/ping.js @@ -11,8 +11,10 @@ function ping (args, silent, cb) { } var registry = npm.config.get('registry') if (!registry) return cb(new Error('no default registry set')) + var auth = npm.config.getCredentialsByURI(registry) - npm.registry.ping(registry, function (er, pong) { + npm.registry.ping(registry, {auth: auth}, function (er, pong) { + if (!silent) console.log(JSON.stringify(pong)) cb(er, er ? null : pong) }) } |