bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Opt-out of PATH changes

Open pcj opened this issue 10 months ago • 1 comments

Bazelisk changes the PATH variable, which has deleterious consequences for nix-based builds, and it seems like a number of other scenarios. There should be a way to ensure that all environment variables are passed through faithfully without modification to the underlying bazel executable.

Related:

  • https://github.com/bazelbuild/bazelisk/issues/471
  • https://github.com/bazelbuild/bazelisk/issues/301

pcj avatar Jan 30 '25 02:01 pcj

2 practical workarounds for this today:

  1. use tools/bazel and re-exec $BAZEL_REAL with env PATH=whatever
  2. --repo_env=PATH=... --action_env=PATH=... --test_env=PATH=...

keith avatar Jan 30 '25 04:01 keith