diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/lib/ping.js')
-rw-r--r-- | deps/npm/node_modules/npm-registry-client/lib/ping.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/lib/ping.js b/deps/npm/node_modules/npm-registry-client/lib/ping.js index b90f99d116..5ab98c52d2 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/ping.js +++ b/deps/npm/node_modules/npm-registry-client/lib/ping.js @@ -11,11 +11,9 @@ function ping (uri, params, cb) { var auth = params.auth assert(auth && typeof auth === 'object', 'must pass auth to ping') - this.request(url.resolve(uri, '-/ping?write=true'), { auth: auth }, function (er, fullData) { - if (er) { - cb(er) - } else if (fullData) { - cb(null, fullData) + this.request(url.resolve(uri, '-/ping?write=true'), { auth: auth }, function (er, fullData, data, response) { + if (er || fullData) { + cb(er, fullData, data, response) } else { cb(new Error('No data received')) } |