From 96e77102e3afe792550b0e8620d88f779acefa2e Mon Sep 17 00:00:00 2001 From: Vitaly Gashkov Date: Sat, 25 Oct 2025 12:03:59 +0500 Subject: [PATCH] fix: skip process if downloaded apk not found --- crextractor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crextractor.js b/crextractor.js index 8152200..7e2de97 100644 --- a/crextractor.js +++ b/crextractor.js @@ -100,6 +100,11 @@ const extract = async ({ target = 'mobile', output, cleanup = false } = {}) => { console.log('Downloading APK...'); const apkPath = target === 'tv' ? await downloadTvApk() : await downloadMobileApk(); + if (existsSync(apkPath)) { + console.error('Unable to find APK (possibly a download error)'); + return; + } + console.log('Decompiling APK...'); const decompiledDir = decompileApk(apkPath);