Skip to content

Commit

Permalink
added support for uppercase ENV variables, closes Erudika/scoold#452
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Apr 22, 2024
1 parent 6e3322f commit f91f2ef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ protected String getConfigParam(String key, String defaultValue) {
if (StringUtils.isBlank(key)) {
return defaultValue;
}
String env = System.getenv(getConfigRootPrefix() + "_" + key.replaceAll("\\.", "_"));
String envKey = getConfigRootPrefix() + "_" + key.replaceAll("\\.", "_");
String env = System.getenv().getOrDefault(envKey.toUpperCase(), System.getenv(envKey)); // support uppercase ENV vars
String sys = System.getProperty(getConfigRootPrefix() + "." + key);
if (!StringUtils.isBlank(sys)) {
return sys;
Expand Down

0 comments on commit f91f2ef

Please sign in to comment.