mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
feat: support alternate environment variable names
The current variable names with dots can not be used in some shells.
This commit is contained in:
parent
524fff45b8
commit
4e879c3cfd
@ -210,11 +210,16 @@ public class SecurityUtils {
|
||||
}
|
||||
|
||||
public static String getenv(String name) {
|
||||
final String env = System.getProperty(name);
|
||||
String env = System.getProperty(name);
|
||||
if (StringUtils.isNotEmpty(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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user