Skip to content

Commit

Permalink
fix: improper use of mount variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas committed Jun 21, 2022
1 parent 21747d5 commit 31853fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/app/revanced/cli/command/MainCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ internal object MainCommand : Runnable {
Adb(outputFile, patcher.data.packageMetadata.packageName, args.deploy!!, !args.mount)
}

val patchedFile =
if (args.mount) outputFile else File(args.cacheDirectory).resolve("${outputFile.nameWithoutExtension}_raw.apk")
val patchedFile = if (args.mount) {

This comment has been minimized.

Copy link
@airend

airend Jun 22, 2022

@Sculas, @oSumAtrIX , this should be (!args.mount) now, since the original logic was inverted twice: once in 1a3db77, and again in 31853fe; might as well use ! like in the block below. Currently, root-mode is completely broken since outputFile is clobbered before deploy.

File(args.cacheDirectory).resolve("${outputFile.nameWithoutExtension}_raw.apk")
} else outputFile

Patcher.start(patcher, patchedFile)

println("[aligning & signing]")

if (args.mount) {
if (!args.mount) {
Signing.start(
patchedFile,
outputFile,
Expand Down

0 comments on commit 31853fe

Please sign in to comment.