Skip to content

Commit

Permalink
Change to app.dir
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-Fabi committed Nov 29, 2023
1 parent 6a631f1 commit a2b14be
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import org.datepollsystems.waiterrobot.mediator.core.ID
import org.datepollsystems.waiterrobot.mediator.utils.emptyToNull
import java.io.File

@Serializable
Expand All @@ -28,9 +29,8 @@ data class MediatorConfiguration(
}

companion object {
// TODO fix this location is not valid in prod
private fun getFile(): File {
val rootPath = System.getProperty("user.dir") // TODO maybe replace with app.dir (see https://conveyor.hydraulic.dev/12.1/configs/jvm/#appjvmsystem-properties)
val rootPath = System.getProperty("app.dir")?.emptyToNull() ?: System.getProperty("user.dir")
return File(rootPath, "WaiterRobot/config/mediatorConfig.json")
}

Expand Down

0 comments on commit a2b14be

Please sign in to comment.