mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-06-02 11:26:06 +02:00
feat: patches with no packages when filtering
This commit is contained in:
parent
7d1c0e663f
commit
cac4e587d4
|
@ -47,6 +47,13 @@ internal object ListPatchesCommand : Runnable {
|
|||
)
|
||||
private var packageName: String? = null
|
||||
|
||||
@Option(
|
||||
names = ["--filter-include-packageless"],
|
||||
description = ["Include patches with no compatible packages listed when filtering by package name."],
|
||||
showDefaultValue = ALWAYS
|
||||
)
|
||||
private var patchesWithNoPackage: Boolean = false
|
||||
|
||||
override fun run() {
|
||||
fun Patch.CompatiblePackage.buildString() = buildString {
|
||||
if (withVersions && versions != null) {
|
||||
|
@ -92,7 +99,7 @@ internal object ListPatchesCommand : Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
fun Patch<*>.anyPackageName(name: String) = compatiblePackages?.any { it.name == name } == true
|
||||
fun Patch<*>.anyPackageName(name: String) = compatiblePackages?.any { it.name == name } ?: patchesWithNoPackage
|
||||
|
||||
val patches = PatchBundleLoader.Jar(*patchBundles)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user