mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-01-12 12:15:49 +01:00
fix: print original instead of kebab cased names
This commit is contained in:
parent
fa85482c4a
commit
5eaad33dc1
@ -17,12 +17,11 @@ fun Patcher.addPatchesFiltered(allPatches: PatchList) {
|
|||||||
val includedPatches = mutableListOf<Class<out Patch<Context>>>()
|
val includedPatches = mutableListOf<Class<out Patch<Context>>>()
|
||||||
allPatches.forEach patchLoop@{ patch ->
|
allPatches.forEach patchLoop@{ patch ->
|
||||||
val compatiblePackages = patch.compatiblePackages
|
val compatiblePackages = patch.compatiblePackages
|
||||||
val patchName = patch.patchName.lowercase().replace(" ", "-")
|
|
||||||
val args = args.patchArgs?.patchingArgs!!
|
val args = args.patchArgs?.patchingArgs!!
|
||||||
|
|
||||||
val prefix = "Skipping $patchName"
|
val prefix = "Skipping ${patch.patchName}"
|
||||||
|
|
||||||
if (compatiblePackages == null) logger.trace("$patchName: No constraint on packages.")
|
if (compatiblePackages == null) logger.trace("${patch.patchName}: No package constraints.")
|
||||||
else {
|
else {
|
||||||
if (!compatiblePackages.any { it.name == packageName }) {
|
if (!compatiblePackages.any { it.name == packageName }) {
|
||||||
logger.trace("$prefix: Incompatible with $packageName. This patch is only compatible with ${
|
logger.trace("$prefix: Incompatible with $packageName. This patch is only compatible with ${
|
||||||
@ -42,15 +41,16 @@ fun Patcher.addPatchesFiltered(allPatches: PatchList) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.excludedPatches.contains(patchName)) {
|
val kebabCasedPatchName = patch.patchName.lowercase().replace(" ", "-")
|
||||||
|
if (args.excludedPatches.contains(kebabCasedPatchName)) {
|
||||||
logger.info("$prefix: Manually excluded")
|
logger.info("$prefix: Manually excluded")
|
||||||
return@patchLoop
|
return@patchLoop
|
||||||
} else if ((!patch.include || args.exclusive) && !args.includedPatches.contains(patchName)) {
|
} else if ((!patch.include || args.exclusive) && !args.includedPatches.contains(kebabCasedPatchName)) {
|
||||||
logger.info("$prefix: Excluded by default")
|
logger.info("$prefix: Excluded by default")
|
||||||
return@patchLoop
|
return@patchLoop
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("Adding $patchName")
|
logger.trace("Adding ${patch.patchName}")
|
||||||
includedPatches.add(patch)
|
includedPatches.add(patch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user