Skip to content

Commit

Permalink
Ignore blank CI environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Jan 24, 2024
1 parent 0257c2e commit 6b03d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ val buildVariants = getCiEnv("CI_BUILD_VARIANTS") ?: properties["buildVariants"]
val forceInternalUserFlag = getCiEnv("CI_FORCE_INTERNAL_USER_FLAG") ?: properties["forceInternalUserFlag"] as String
val mapsApiKey = getCiEnv("CI_MAPS_API_KEY") ?: properties["mapsApiKey"] as String

fun getCiEnv(name: String): String? = if (ciEnabled) System.getenv(name) else null
fun getCiEnv(name: String) = if (ciEnabled) System.getenv(name).takeUnless { it.isNullOrBlank() } else null

wire {
kotlin {
Expand Down

0 comments on commit 6b03d8f

Please sign in to comment.