diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java index 6cb683e2d0fabd..e3c896c8fb4955 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java @@ -340,7 +340,7 @@ public void exit(AbruptExitException exception) { String name = entry.getKey(); String value = entry.getValue(); if (value == null) { - value = System.getenv(name); + value = clientEnv.get(name); } if (value != null) { repoEnv.put(name, value);