Skip to content

Commit 1b645c6

Browse files
committed
feat: debugging option
1 parent 4758289 commit 1b645c6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/main/kotlin/app/revanced/cli/MainCommand.kt

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ internal object MainCommand : Runnable {
5252
@Option(names = ["-d", "--deploy-on"], description = ["If specified, deploy to adb device with given name"])
5353
internal var deploy: String? = null
5454

55+
@Option(names = ["-b", "--debugging"], description = ["Disable patch version compatibility"])
56+
internal var debugging: Boolean = false
57+
5558
override fun run() {
5659
if (listOnly) {
5760
for (patchBundlePath in patchBundles) for (it in JarPatchBundle(patchBundlePath).loadPatches()) {

src/main/kotlin/app/revanced/utils/patcher/Patcher.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fun Patcher.addPatchesFiltered(
3434
return@patch
3535
}
3636

37-
if (!compatiblePackage.versions.any { it == packageVersion }) {
37+
if (!(MainCommand.debugging || compatiblePackage.versions.any { it == packageVersion })) {
3838
println("$prefix: Unsupported version.")
3939
return@patch
4040
}

0 commit comments

Comments
 (0)