From 1bb0d13726fd5790c59cb6d28df3618c7606710d Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 5 Nov 2024 19:59:09 +0100 Subject: [PATCH] fix: Make CLI ArgGroup non-exclusive to be able to disable and enable patches at the same time --- src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt b/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt index c59bfd3..efbc755 100644 --- a/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt +++ b/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt @@ -29,11 +29,11 @@ internal object PatchCommand : Runnable { @Spec private lateinit var spec: CommandSpec - @ArgGroup(multiplicity = "0..*") + @ArgGroup(exclusive = false, multiplicity = "0..*") private var selection = mutableSetOf() internal class Selection { - @ArgGroup(exclusive = false, multiplicity = "1") + @ArgGroup(exclusive = false) internal var enabled: EnableSelection? = null internal class EnableSelection { @@ -65,7 +65,7 @@ internal object PatchCommand : Runnable { internal var options = mutableMapOf() } - @ArgGroup(exclusive = false, multiplicity = "1") + @ArgGroup(exclusive = false) internal var disable: DisableSelection? = null internal class DisableSelection { @@ -291,7 +291,6 @@ internal object PatchCommand : Runnable { patcherTemporaryFilesPath, aaptBinaryPath?.path, patcherTemporaryFilesPath.absolutePath, - true, ), ).use { patcher -> val packageName = patcher.context.packageMetadata.packageName