Skip to content

Commit 63f85dd

Browse files
committed
Captialize environment variable name prior to check
1 parent 8bfc1ec commit 63f85dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/EnvVariableUtils.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ private static Set<String> getRequiredEnvVariableKeys() {
5151
if (OS.WINDOWS.isCurrent()) {
5252
requiredEnvVariableKeys.addAll(REQUIRED_ENV_VARIABLE_KEYS_WINDOWS);
5353
}
54+
System.out.printf("XXX cout reuired var= %s\n", requiredEnvVariableKeys);
55+
System.err.printf("XXX cerr reuired var= %s\n", requiredEnvVariableKeys);
5456
return requiredEnvVariableKeys;
5557
}
5658

@@ -82,19 +84,20 @@ public boolean isKeyRequired() {
8284
}
8385

8486
public static boolean isKeyRequired(String key) {
85-
mapKey(key);
86-
return isKeyRequiredCondition(key);
87+
return isKeyRequiredCondition(mapKey(key));
8788
}
8889

8990
private static String mapKey(String key) {
9091
if (OS.WINDOWS.isCurrent()) {
92+
System.err.println("XXX ROOT mapKey " + key + " to " + key.toUpperCase(Locale.ROOT));
9193
return key.toUpperCase(Locale.ROOT);
9294
}
9395
return key;
9496
}
9597

9698
private static boolean isKeyRequiredCondition(String key) {
9799
// LC_* are locale vars that override LANG for specific categories (or all, with LC_ALL)
100+
System.err.println("XXX cerr key " + key + " req=" + REQUIRED_ENV_VARIABLE_KEYS.contains(key));
98101
return REQUIRED_ENV_VARIABLE_KEYS.contains(key) || key.startsWith("LC_");
99102
}
100103
}

0 commit comments

Comments
 (0)