Skip to content

Commit

Permalink
fix: do not filter explicitly included patches
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot authored and oSumAtrIX committed Aug 28, 2023
1 parent 41ffc99 commit a3d8f00
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/app/revanced/cli/command/PatchCommand.kt
Expand Up @@ -241,11 +241,10 @@ internal object PatchCommand : Runnable {
val explicitlyExcluded = excludedPatches.contains(formattedPatchName)
if (explicitlyExcluded) return@patch logger.info("Excluding ${patch.patchName}")

// If the patch is explicitly included, it will be included if [exclusive] is false.
val explicitlyIncluded = exclusive && includedPatches.contains(formattedPatchName)

// If the patch is implicitly included, it will be only included if [exclusive] is false.
val implicitlyIncluded = !exclusive && patch.include
// If the patch is explicitly included, it will be included even if [exclusive] is false.
val explicitlyIncluded = includedPatches.contains(formattedPatchName)

val included = implicitlyIncluded || explicitlyIncluded
if (!included) return@patch logger.info("${patch.patchName} excluded by default") // Case 1.
Expand Down

0 comments on commit a3d8f00

Please sign in to comment.