Skip to content

Commit

Permalink
fix: don't print same patch multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas committed Sep 8, 2022
1 parent 240ab18 commit f4b0469
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/kotlin/app/revanced/cli/command/MainCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ internal object MainCommand : Runnable {
}

private fun printListOfPatches() {
val logged = mutableListOf<String>()
for (patchBundlePath in args.patchArgs?.patchBundles!!) for (patch in JarPatchBundle(patchBundlePath).loadPatches()) {
if (patch.patchName in logged) continue
for (compatiblePackage in patch.compatiblePackages!!) {
val packageEntryStr = buildString {
// Add package if flag is set
Expand All @@ -250,8 +252,9 @@ internal object MainCommand : Runnable {
append("\t")
append(compatibleVersions)
}

}

logged.add(patch.patchName)
logger.info(packageEntryStr)
}
}
Expand Down

0 comments on commit f4b0469

Please sign in to comment.