From a41d67ba26818bdf60870ce65b4e5c825718e510 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Wed, 5 Jul 2023 14:53:09 -0700 Subject: [PATCH 1/2] Getting rid of duplicate gradle error messages --- .../src/commands/runAndroid/runOnAllDevices.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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, ); } From e37e365f87329245a9749899e14c9cfb99e682a3 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Thu, 6 Jul 2023 11:35:55 -0700 Subject: [PATCH 2/2] Spacing fix --- .../src/commands/runAndroid/runOnAllDevices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts b/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts index 4b56985a9..d223197bf 100644 --- a/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts +++ b/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts @@ -148,7 +148,7 @@ function createInstallError(error: Error & {stderr: string}) { } return new CLIError( - `Failed to install the app.${message || ''}`, + `Failed to install the app.${message ? ' ' + message : ''}`, error.message.length > 0 ? undefined : error, ); }