diff --git a/local-cli/runAndroid/runAndroid.js b/local-cli/runAndroid/runAndroid.js index 2bb7dd7446f262..0ab849eef9240d 100644 --- a/local-cli/runAndroid/runAndroid.js +++ b/local-cli/runAndroid/runAndroid.js @@ -121,7 +121,7 @@ function buildAndRun(args) { const adbPath = getAdbPath(); if (args.deviceId) { if (isString(args.deviceId)) { - runOnSpecificDevice( + return runOnSpecificDevice( args, cmd, packageNameWithSuffix, @@ -132,7 +132,13 @@ function buildAndRun(args) { console.log(chalk.red('Argument missing for parameter --deviceId')); } } else { - runOnAllDevices(args, cmd, packageNameWithSuffix, packageName, adbPath); + return runOnAllDevices( + args, + cmd, + packageNameWithSuffix, + packageName, + adbPath, + ); } } @@ -305,7 +311,7 @@ function runOnAllDevices( // stderr is automatically piped from the gradle process, so the user // should see the error already, there is no need to do // `console.log(e.stderr)` - return Promise.reject(); + return Promise.reject(e); } const devices = adb.getDevices(); if (devices && devices.length > 0) { @@ -343,7 +349,7 @@ function runOnAllDevices( // stderr is automatically piped from the gradle process, so the user // should see the error already, there is no need to do // `console.log(e.stderr)` - return Promise.reject(); + return Promise.reject(e); } } }