P2help wantedteam-Documentationteam-Remote-Exectype: documentation (cleanup)
Repository-Metriken
- Stars
- (25.384 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 22T 20h) (77 gemergte PRs in 30 T)
Beschreibung
Description of the problem / feature request:
Environment variable handling is under-documented.
After trial-and-error, this is my understanding;
- If
--incompatible_strict_action_env(enabled by default) is disabled, then Bazel automatically passesPATH,LD_LIBRARY_PATH, andTMPDIRto actions that useuse_default_shell_env. --action_envpasses environment variables to actions for the target configuration that useuse_default_shell_env.--host_action_envpasses environment variables to actions for the exec configuration that useuse_default_shell_env.- If
envanduse_default_shell_envofctx.actionsare both used, the former is ignored.
Assuming these statements are correct, they ought to be documented.
In particular, the following facts are missing from current docs:
(a) use_default_shell_env is required to pass any CLI-configured vars to actions.
(b) use_default_shell_env causes env to be ignored.
P.S. use_default_shell_env is an awkward name, because it actually has nothing to do with shells.