From 914e2fa35fa111a45ce6de7937e62ce97e29dcc8 Mon Sep 17 00:00:00 2001 From: daserge Date: Thu, 28 Apr 2016 17:25:39 +0300 Subject: [PATCH] CB-11163 Android Builds are failing in CI CB-11133 Handle android emulator start failure (reverted from commit abcaee24f9bd0e680f8d06ced5e0d363d63cffb7) --- bin/templates/cordova/lib/emulator.js | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js index 9aa4816e..bd85dcd4 100644 --- a/bin/templates/cordova/lib/emulator.js +++ b/bin/templates/cordova/lib/emulator.js @@ -182,26 +182,9 @@ module.exports.start = function(emulator_ID, boot_timeout) { var uuidProp = 'emu.uuid=' + uuid; var args = ['-avd', emulatorId, '-prop', uuidProp]; // Don't wait for it to finish, since the emulator will probably keep running for a long time. - var emulatorProcess = child_process - .spawn('emulator', args, { detached: true }); - - emulatorProcess.stderr.on('data', function (data) { - throw new CordovaError(data); - }); - - emulatorProcess.stdout.on('data', function (data) { - if (/ERROR/.test(data)) { - throw new CordovaError(data); - } - }); - - emulatorProcess.on('exit', function(code) { - if (code !== 0) { - throw new CordovaError('Emulator process exited with code: ' + code); - } - }); - - emulatorProcess.unref(); + child_process + .spawn('emulator', args, { stdio: 'inherit', detached: true }) + .unref(); // wait for emulator to start events.emit('log', 'Waiting for emulator...');