1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-26 06:46:45 +00:00

Merge pull request #1365 from fgreinacher/fix/properties-env

feat: support alternate environment variable names
This commit is contained in:
PlantUML 2023-03-27 17:05:07 +02:00 committed by GitHub
commit 32429afbb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,11 +210,16 @@ public class SecurityUtils {
} }
public static String getenv(String name) { public static String getenv(String name) {
final String env = System.getProperty(name); String env = System.getProperty(name);
if (StringUtils.isNotEmpty(env)) if (StringUtils.isNotEmpty(env))
return env; return env;
return System.getenv(name); env = System.getenv(name);
if (StringUtils.isNotEmpty(env))
return env;
final String alternateName = name.replace(".", "_").toUpperCase();
return System.getenv(alternateName);
} }
/** /**