Skip to content

enable_platform_specific_config had flag overrides has surprising behavior #15270

@keith

Description

@keith

Description of the bug:

If you have a bazelrc with these contents:

build --enable_platform_specific_config
build --action_env=PATH
build:macos --action_env=PATH=/usr/bin:/macos

The PATH that is actually used is the passthrough defined by --action_env=PATH, not /usr/bin:/macos. If you flip the ordering to:

build --action_env=PATH
build --enable_platform_specific_config
build:macos --action_env=PATH=/usr/bin:/macos

I would expect --enable_platform_specific_config to take effect after the other options have been added, but maybe there is no great default for this.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

With this repro case run bazel build foo -s, and change the .bazelrc as needed.

pathrepro.zip

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

release 5.1.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

Nope

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Labels

team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: buguntriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions