fix: fallback to /usr/bin/env if env is not in PATH by rickeylev · Pull Request #3577 · bazel-contrib/rules_python

@rickeylev

This fixes an issue where the bootstrap script would fail if env was
not in the PATH, which is the case on NixOS. The script now checks if
env exists, and if not, falls back to /usr/bin/env.

Fixes bazel-contrib#3575

gemini-code-assist[bot]

Merged via the queue into bazel-contrib:main with commit dddd7a2

Feb 8, 2026

4 checks passed

aignas pushed a commit to aignas/rules_python that referenced this pull request

Feb 23, 2026
This fixes an issue where the bootstrap script would fail if env was not
in the PATH, which is the case on NixOS, or when Bazel's strict action
env is enabled.

To fix, the bootstrap checks if env exists, and if not, falls back to
/usr/bin/env.

Fixes bazel-contrib#3575