diff --git a/src/adb/AdbProvider.ts b/src/adb/AdbProvider.ts index cfc0c9feae..dcabe8b5ca 100644 --- a/src/adb/AdbProvider.ts +++ b/src/adb/AdbProvider.ts @@ -2693,7 +2693,7 @@ export class AdbProvider { new AnalysisUnsupportedTargetError( operation, input.serial, - verdict.reason ?? "the device refused the installation", + verdict.reason, ), ); return ok( @@ -2767,7 +2767,7 @@ export class AdbProvider { new AnalysisUnsupportedTargetError( operation, input.serial, - verdict.reason ?? "the device refused the removal", + verdict.reason, ), ); return ok( diff --git a/src/adb/AdbShellOutput.ts b/src/adb/AdbShellOutput.ts index 8e43b82e51..f6fc9e01df 100644 --- a/src/adb/AdbShellOutput.ts +++ b/src/adb/AdbShellOutput.ts @@ -418,10 +418,9 @@ export const packageChangeFailureReason = (output: string): string | null => */ export const parsePackageChangeOutput = ( stdout: string, -): { - readonly status: "success" | "failure" | "unknown"; - readonly reason: string | null; -} => { +): + | { readonly status: "success" | "unknown"; readonly reason: null } + | { readonly status: "failure"; readonly reason: string } => { const text = stdout.trim(); const failure = packageChangeFailureReason(text); if (failure !== null) return { status: "failure", reason: failure };