Skip to content

Commit

Permalink
Error on bad RUNFILES_DIR and set RUNFILES_DIR to abs path
Browse files Browse the repository at this point in the history
  • Loading branch information
mishazharov committed Feb 1, 2024
1 parent a91d7ca commit dc6d1eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions foreign_cc/private/runnable_binary_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
# --- end runfiles.bash initialization v2 ---

if [[ ! -d "${RUNFILES_DIR}" ]]; then
>&2 echo "RUNFILES_DIR is set to '${RUNFILES_DIR}' which does not exist";
exit 1;
fi

RUNFILES_DIR=$(realpath ${RUNFILES_DIR})

cd "${RUNFILES_DIR}"

EXE=EXECUTABLE
Expand Down

0 comments on commit dc6d1eb

Please sign in to comment.