diff --git a/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts b/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts index 737608e95..4b56985a9 100644 --- a/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts +++ b/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts @@ -122,7 +122,7 @@ async function runOnAllDevices( function createInstallError(error: Error & {stderr: string}) { const stderr = (error.stderr || '').toString(); - let message = error.message ?? ''; + let message = ''; // Pass the error message from the command to stdout because we pipe it to // parent process so it's not visible logger.log(stderr); @@ -148,8 +148,8 @@ function createInstallError(error: Error & {stderr: string}) { } return new CLIError( - `Failed to install the app. ${message}`, - message.length > 0 ? undefined : error, + `Failed to install the app.${message || ''}`, + error.message.length > 0 ? undefined : error, ); }