Skip to content

incompatible_merge_fixed_and_default_shell_env #19317

@fmeum

Description

@fmeum

With this flag enabled, when an action is registered with both use_default_shell_env = True and a non-empty env dict, the values of the env dict will override the values inherited from the shell environment. Previously, the env dict would be ignored in this case.

Since the default shell environment is user-controlled via --action_env and any values set via env on actions that also set use_default_shell_env = True have been ignored so far, this change should only break rules that have been setting invalid environment variables via env that are now becoming effective.

Users experiencing breakages due to this change can temporarily disable it via --noincompatible_merge_fixed_and_default_shell_env. Rule authors should verify that their actions with use_default_shell_env = True succeed even if the variables specified in env are applied and remove variables from that dict if needed.

Metadata

Metadata

Assignees

Labels

breaking-change-7.0Incompatible flags to be flipped in Bazel 7.0incompatible-changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenteam-Rules-APIAPI for writing rules/aspects: providers, runfiles, actions, artifactstype: process

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions