From 689f5b13be4586674bff2ca540a65c593cef1880 Mon Sep 17 00:00:00 2001 From: Prateek <129204458+prateek-who@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:06:07 +0530 Subject: [PATCH] patch names are insensitive patch names are now case insensitive. --- src/main/kotlin/app/morphe/cli/command/PatchCommand.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/app/morphe/cli/command/PatchCommand.kt b/src/main/kotlin/app/morphe/cli/command/PatchCommand.kt index 2987f03..fd8e246 100644 --- a/src/main/kotlin/app/morphe/cli/command/PatchCommand.kt +++ b/src/main/kotlin/app/morphe/cli/command/PatchCommand.kt @@ -544,19 +544,19 @@ internal object PatchCommand : Callable { packageVersion: String, ): Set> = buildSet { val enabledPatchesByName = - selection.mapNotNull { it.enabled?.selector?.name }.toSet() + selection.mapNotNull { it.enabled?.selector?.name?.lowercase() }.toSet() val enabledPatchesByIndex = selection.mapNotNull { it.enabled?.selector?.index }.toSet() val disabledPatches = - selection.mapNotNull { it.disable?.selector?.name }.toSet() + selection.mapNotNull { it.disable?.selector?.name?.lowercase() }.toSet() val disabledPatchesByIndex = selection.mapNotNull { it.disable?.selector?.index }.toSet() this@filterPatchSelection.withIndex().forEach patchLoop@{ (i, patch) -> val patchName = patch.name!! - val isManuallyDisabled = patchName in disabledPatches || i in disabledPatchesByIndex + val isManuallyDisabled = patchName.lowercase() in disabledPatches || i in disabledPatchesByIndex if (isManuallyDisabled) return@patchLoop logger.info("\"$patchName\" disabled manually") // Make sure the patch is compatible with the supplied APK files package name and version. @@ -588,7 +588,7 @@ internal object PatchCommand : Callable { } ?: logger.fine("\"$patchName\" has no package constraints") val isEnabled = !exclusive && patch.use - val isManuallyEnabled = patchName in enabledPatchesByName || i in enabledPatchesByIndex + val isManuallyEnabled = patchName.lowercase() in enabledPatchesByName || i in enabledPatchesByIndex if (!(isEnabled || isManuallyEnabled)) { return@patchLoop logger.info("\"$patchName\" disabled")