fix: Copy APK to output path when it is not being signed

When `--mount` is used, signing is skipped. For that reason the APK was never copied to the output path.
This commit is contained in:
oSumAtrIX 2024-03-12 14:47:35 +01:00
parent d5c27408f3
commit 366f400c5a
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
1 changed files with 4 additions and 2 deletions

View File

@ -307,10 +307,10 @@ internal object PatchCommand : Runnable {
// region Save
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
patcherResult.applyTo(this)
}.let {
}.let { patchedApkFile ->
if (!mount) {
sign(
it,
patchedApkFile,
outputFilePath,
ApkUtils.SigningOptions(
keystoreFilePath,
@ -320,6 +320,8 @@ internal object PatchCommand : Runnable {
signer,
),
)
} else {
patchedApkFile.copyTo(outputFilePath, overwrite = true)
}
}