diff --git a/lib/cli/doctor/index.js b/lib/cli/doctor/index.js index 249e3da7..7e8540a7 100644 --- a/lib/cli/doctor/index.js +++ b/lib/cli/doctor/index.js @@ -30,16 +30,13 @@ module.exports.handler = function() { var proc = cp.spawn(command, args, options) var stdout = [] - proc.stdout.on('readable', function() { - var chunk - while ((chunk = proc.stdout.read())) { - stdout.push(chunk) - } + proc.stdout.on('data', function(data) { + stdout.push(data) }) proc.on('error', reject) - proc.on('exit', function(code, signal) { + proc.on('close', function(code, signal) { if (signal) { reject(new CheckError('Exited with signal %s', signal)) }