Members
environment
inherited_environment
environment and inherited_environment, the value inherited from the shell environment will take precedence if set. This is most useful for test rules, which run with a hermetic environment under bazel test and can use this mechanism to non-hermetically include a variable from the outer environment. By contrast, bazel run already forwards the outer environment. Note, though, that it may be surprising for an otherwise hermetic test to hardcode a non-hermetic dependency on the environment, and that this may even accidentally expose sensitive information. Prefer setting the test environment explicitly with the --test_env flag, and even then prefer to avoid using this flag and instead populate the environment explicitly.