mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-01-08 10:15:49 +01:00
feat: debugging option
This commit is contained in:
parent
4758289d68
commit
1b645c67db
@ -52,6 +52,9 @@ internal object MainCommand : Runnable {
|
|||||||
@Option(names = ["-d", "--deploy-on"], description = ["If specified, deploy to adb device with given name"])
|
@Option(names = ["-d", "--deploy-on"], description = ["If specified, deploy to adb device with given name"])
|
||||||
internal var deploy: String? = null
|
internal var deploy: String? = null
|
||||||
|
|
||||||
|
@Option(names = ["-b", "--debugging"], description = ["Disable patch version compatibility"])
|
||||||
|
internal var debugging: Boolean = false
|
||||||
|
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (listOnly) {
|
if (listOnly) {
|
||||||
for (patchBundlePath in patchBundles) for (it in JarPatchBundle(patchBundlePath).loadPatches()) {
|
for (patchBundlePath in patchBundles) for (it in JarPatchBundle(patchBundlePath).loadPatches()) {
|
||||||
|
@ -34,7 +34,7 @@ fun Patcher.addPatchesFiltered(
|
|||||||
return@patch
|
return@patch
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!compatiblePackage.versions.any { it == packageVersion }) {
|
if (!(MainCommand.debugging || compatiblePackage.versions.any { it == packageVersion })) {
|
||||||
println("$prefix: Unsupported version.")
|
println("$prefix: Unsupported version.")
|
||||||
return@patch
|
return@patch
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user