cool-easter-32542
07/06/2024, 8:18 PMexperimental_workspace_environment) reported that the edits to PATH made by the binary shims support (i.e., the tools field on shell_command) interacted poorly with executing Bazel via in-workspace execution. Namely, the edits made to PATH by Pants caused PATH to vary for each Bazel invocation. Given that Bazel incorporates PATH into its cache key, this means that each invocation of Bazel had to rebuild the Bazel target which was being built.
I researched the issue a bit and learned that shell_command was ignoring any user-supplied PATH value and just using the binary shim path.
The user would like to override this behavior and have PATH passed to the process invoked by shell_command / adhoc_tool as it is explicitly configured and without any binary shims modification or other edits.
pantsbuild/pants