diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-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. |