Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
feat: allow to set config file path with CONFIG_PATH env
Browse files Browse the repository at this point in the history
  • Loading branch information
AH-dark committed Dec 8, 2023
1 parent 74030b9 commit d705857
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
}

group = "com.ahdark.code"
version = "1.0.3"
version = "1.0.4"

application {
mainClass.set("com.ahdark.code.ApplicationKt")
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/ahdark/code/utils/ConfigUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.io.InputStream
import java.util.*

class ConfigUtils {
private val configFileName = "config.properties"
private val configFileName = System.getenv("CONFIG_PATH") ?: "config.properties"

private val props = Properties()
private val resourceStream: InputStream? = javaClass.classLoader.getResourceAsStream(configFileName)
Expand Down

0 comments on commit d705857

Please sign in to comment.