Skip to content

Commit c97cccf

Browse files
committed
Hide environment variables starting with '=' on windows
1 parent 52f85a3 commit c97cccf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ public void postInitialize(Python3Core core) {
330330
}
331331
Object key, val;
332332
if (PythonOS.getPythonOS() == PythonOS.PLATFORM_WIN32) {
333+
if (entry.getKey().startsWith("=")) {
334+
// Hidden variable, shouldn't be visible to python
335+
continue;
336+
}
333337
key = toTruffleStringUncached(entry.getKey());
334338
} else {
335339
key = core.factory().createBytes(entry.getKey().getBytes());

0 commit comments

Comments
 (0)