Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed status code when run-android fails #21012

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions local-cli/runAndroid/runAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function buildAndRun(args) {
const adbPath = getAdbPath();
if (args.deviceId) {
if (isString(args.deviceId)) {
runOnSpecificDevice(
return runOnSpecificDevice(
args,
cmd,
packageNameWithSuffix,
Expand All @@ -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,
);
}
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
}
}
Expand Down