Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a modification of PR bazelbuild#8415, which changed `which` to `command -v` so it works when PATH isn't exported. `command` is more standard for this kind of use case (https://github.com/koalaman/shellcheck/wiki/SC2230). Unfortunately, `command -v` doesn't check the executable bit, so it's not as useful for us. The previous fix for this issue (bazelbuild@7f49531) was based on exporting PATH, but this changes the environment seen by the exec'd payload Python code. The solution in this commit is to not export PATH but rather explicitly pass it to each invocation of `which`. Fixes bazelbuild#8414. See also bazelbuild/continuous-integration#578. Closes bazelbuild#8415. PiperOrigin-RevId: 249334274
- Loading branch information