diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-03-24 10:50:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 10:50:12 +0100 |
commit | 0ca2a57b64812e26de24e7de220e4d0e1861bddf (patch) | |
tree | ee033a6c98f7432a074b883881215cb23d6bcdd6 /src/main/java/at | |
parent | d03dce8b859a263de4ec06b3ddc7427b83842aa1 (diff) | |
download | skyhanni-0ca2a57b64812e26de24e7de220e4d0e1861bddf.tar.gz skyhanni-0ca2a57b64812e26de24e7de220e4d0e1861bddf.tar.bz2 skyhanni-0ca2a57b64812e26de24e7de220e4d0e1861bddf.zip |
Internal Fix: RepoPattern and Tests (#1258)
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt index 3e32cbcb9..27ceb7181 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.utils.repopatterns import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.config.features.dev.RepoPatternConfig import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.LorenzEvent import at.hannibal2.skyhanni.events.PreInitFinishedEvent @@ -45,7 +46,16 @@ object RepoPatternManager { true } - private val config get() = SkyHanniMod.feature.dev.repoPattern + private val insideTest = Launch.blackboard == null + + private val config + get() = if (!insideTest) { + SkyHanniMod.feature.dev.repoPattern + } else { + RepoPatternConfig().apply { + tolerateDuplicateUsage = true + } + } /** * Crash if in a development environment, or if inside a guarded event handler. |