mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-11-18 17:49:23 +01:00
feat: --include
option (#76)
This commit is contained in:
parent
585d77ce80
commit
57a1e7c27f
@ -57,6 +57,9 @@ internal object MainCommand : Runnable {
|
||||
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
|
||||
var excludedPatches = arrayOf<String>()
|
||||
|
||||
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
||||
var includedPatches = arrayOf<String>()
|
||||
|
||||
@Option(names = ["-r", "--resource-patcher"], description = ["Disable patching resources"])
|
||||
var disableResourcePatching: Boolean = false
|
||||
|
||||
|
@ -30,7 +30,7 @@ fun Patcher.addPatchesFiltered(
|
||||
if (excludePatches && args.excludedPatches.contains(patchName)) {
|
||||
logger.info("$prefix: Explicitly excluded")
|
||||
return@patch
|
||||
} else if (!patch.include) {
|
||||
} else if (!patch.include && !args.includedPatches.contains(patchName)) {
|
||||
logger.info("$prefix: Explicitly excluded")
|
||||
return@patch
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user