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 #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 (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 #8414. See also bazelbuild/continuous-integration#578. Closes #8415. PiperOrigin-RevId: 249334274
- Loading branch information