Expand environment vars specified in the YAML config
@@ -1071,7 +1071,7 @@ def execute_commands(
for key, value in task_config.get("environment", {}).items():
# We have to explicitly convert the value to a string, because sometimes YAML tries to
# be smart and converts strings like "true" and "false" to booleans.
- os.environ[key] = str(value)
+ os.environ[key] = os.path.expandvars(str(value))
# Set BAZELISK_SHUTDOWN to 1 when we use bazelisk --migrate on Windows.
# This is a workaround for https://github.com/bazelbuild/continuous-integration/issues/1012
