From 0a11b3bd09287c7ff4727c48d7a3896023963884 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Thu, 11 May 2023 17:05:16 +0800 Subject: [PATCH] fix unhandled rejection when installing apk (#446) Signed-off-by: Bambloo --- src/adb/DeviceClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adb/DeviceClient.ts b/src/adb/DeviceClient.ts index f9ac2a76..d571fd33 100644 --- a/src/adb/DeviceClient.ts +++ b/src/adb/DeviceClient.ts @@ -430,7 +430,7 @@ export default class DeviceClient { let errorListener: (err: Error) => void; return new Bluebird((resolve, reject) => { errorListener = (err: Error) => reject(err); - endListener = () => this.installRemote(temp).then((value: boolean) => resolve(value)); + endListener = () => this.installRemote(temp).then((value: boolean) => resolve(value)).catch(reject); transfer.on('error', errorListener); transfer.on('end', endListener); }).finally(() => {