Skip to content

Commit 366f400

Browse files
committed
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.
1 parent d5c2740 commit 366f400

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/kotlin/app/revanced/cli/command/PatchCommand.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ internal object PatchCommand : Runnable {
307307
// region Save
308308
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
309309
patcherResult.applyTo(this)
310-
}.let {
310+
}.let { patchedApkFile ->
311311
if (!mount) {
312312
sign(
313-
it,
313+
patchedApkFile,
314314
outputFilePath,
315315
ApkUtils.SigningOptions(
316316
keystoreFilePath,
@@ -320,6 +320,8 @@ internal object PatchCommand : Runnable {
320320
signer,
321321
),
322322
)
323+
} else {
324+
patchedApkFile.copyTo(outputFilePath, overwrite = true)
323325
}
324326
}
325327

0 commit comments

Comments
 (0)