This has the confusing behavior that variables with a lowercase key trump an uppercase key
|
internal fun calcMode(): Mode { |
|
val override = lowercaseFromEnvOrSys("selfie") ?: lowercaseFromEnvOrSys("SELFIE") |
|
if (override != null) { |
|
return Mode.valueOf(override) |
|
} |
|
val ci = lowercaseFromEnvOrSys("ci") ?: lowercaseFromEnvOrSys("CI") |
|
return if (ci == "true") Mode.readonly else Mode.interactive |
|
} |
I think it's good to be case-insensitive, but if both variables exist and disagree it should generate an easy-to-understand error.
This has the confusing behavior that variables with a lowercase key trump an uppercase key
selfie/jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SelfieSettingsAPI.kt
Lines 31 to 38 in e6fb9e6
I think it's good to be case-insensitive, but if both variables exist and disagree it should generate an easy-to-understand error.