fix test mod location

Fixes the pipeline on windows
This commit is contained in:
Moritz Zwerger 2023-12-19 15:14:26 +01:00
parent 41ccca86e1
commit b912becb76
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -30,7 +30,9 @@ class LoadingPhaseTest {
private fun create(path: String): LoadingPhase {
ModLoader.mods.clear()
val phase = LoadingPhase(path)
phase::class.java.getFieldOrNull("path")!!.forceSet(phase, File("./src/integration-test/resources/mods/$path"))
val rootResources = LoadingPhaseTest::class.java.classLoader.getResource("mods/")
phase::class.java.getFieldOrNull("path")!!.forceSet(phase, File(rootResources.path.removeSuffix("/") + "/" + path))
return phase
}