Skip to content

Commit

Permalink
[8.0.1] Make rlocation in test-setup.sh compatible with /bin/sh (#24628)
Browse files Browse the repository at this point in the history
Addressing
#24256 (comment)

PiperOrigin-RevId: 704624513
Change-Id: I73ec6559a7a7b2465abd2faae0e687a97ea77db9

Commit
9ed06ad

Co-authored-by: Googler <[email protected]>
  • Loading branch information
bazel-io and meteorcloudy authored Dec 11, 2024
1 parent 2a4f9c7 commit 27389e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/test/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ fi
# Redefine rlocation to notify users of its removal - it used to be exported.
# TODO: Remove this before Bazel 9.
function rlocation() {
read LINE SUB FILE < <(caller 0);
>&2 echo "ERROR: rlocation is no longer implicitly provided by Bazel's test setup, but called from $SUB in line $LINE of $FILE. Please use https://github.com/bazelbuild/rules_shell/blob/main/shell/runfiles/runfiles.bash instead."
exit 1
caller 0 | {
read LINE SUB FILE
echo >&2 "ERROR: rlocation is no longer implicitly provided by Bazel's test setup, but called from $SUB in line $LINE of $FILE. Please use https://github.com/bazelbuild/rules_shell/blob/main/shell/runfiles/runfiles.bash instead."
exit 1
}
}
export -f rlocation

Expand Down

0 comments on commit 27389e4

Please sign in to comment.