--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAKeN2ed3CE6SZFR7N97fyL7yMc6qNeHb7OEPaQj0JJFjtqfjZQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/1eea8bc5-1d6d-4743-b26f-1f33fb42da97n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/6e3c4cc0-cb83-44e0-bba5-5915716dc0e2n%40googlegroups.com.
For Bazel run (terminating run actions):
The whole host environment is accessible from the binary that shall be ran
–action_env is always taken into account
For Bazel test (terminating test actions):
PATH is always taken from the host and accessible by actions
–action_env is always taken into account
USER is set based on the current user running Bazel (simply changing the env variable on the host [e.g. export USER=FOO] without switching the user does not change this env var in Bazel. However, it affects the path to the local cache /home/<REAL_USER>/.cache/bazel/_bazel_<USER_ENV>/……). It can be changed with –action_env though.
For bazel build (all build actions):
By default, NO environment variables are available to the action, this cannot be changed with –action_env
When setting use_default_shell_env = True on the action
PATH will automatically become exposed to the action
Env set by –action_env / –host_action_env will be exposed to the action