summaryrefslogtreecommitdiff
path: root/deps/npm/lib/ping.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/ping.js')
-rw-r--r--deps/npm/lib/ping.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/deps/npm/lib/ping.js b/deps/npm/lib/ping.js
index e06be9a471..13f390397c 100644
--- a/deps/npm/lib/ping.js
+++ b/deps/npm/lib/ping.js
@@ -15,7 +15,13 @@ function ping (args, silent, cb) {
var auth = npm.config.getCredentialsByURI(registry)
npm.registry.ping(registry, {auth: auth}, function (er, pong, data, res) {
- if (!silent) output(JSON.stringify(pong))
+ if (!silent) {
+ if (er) {
+ output('Ping error: ' + er)
+ } else {
+ output('Ping success: ' + JSON.stringify(pong))
+ }
+ }
cb(er, er ? null : pong, data, res)
})
}