bazelbuild/bazel

Bazel sends host's PATH to remote executor

Open

#28 065 ouverte le 19 déc. 2025

Voir sur GitHub
 (6 commentaires) (0 réactions) (0 assignés)Java (4 465 forks)batch import
P3area-Windowshelp wantedteam-Remote-Exectype: bug

Métriques du dépôt

Stars
 (25 384 stars)
Métriques de merge PR
 (Merge moyen 22j 20h) (77 PRs mergées en 30 j)

Description

Description of the bug:

Even with the strict action env, the PATH that gets sent to a remote action can be very incorrect. For example, when running on a Windows host and a linux executor, I see PATH=C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0.

This results in bash scripts being unable to execute shebangs such as #!/usr/bin/env bash as there is no bash in the (nonsense) PATH

Which category does this issue belong to?

No response

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

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

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 HEAD ?

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No response

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

cc @fmeum

Guide contributeur