Skip to content

Commit

Permalink
Do not set RUNFILES_DIR to non existent directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mishazharov committed Jan 2, 2024
1 parent 6c84965 commit e36b6b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion foreign_cc/private/runnable_binary_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
# Otherwise, first cd to the runfiles dir for the wrapped executable before searching for shared libraries for the wrapped executable
if [[ -z $RUN_UNDER_RUNFILES ]]; then
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
RUNFILES_DIR=${SCRIPT_DIR}/SH_BINARY_FILENAME.runfiles
RUNFILES_DIR_TMP=${SCRIPT_DIR}/SH_BINARY_FILENAME.runfiles

if [[ -d "$RUNFILES_DIR_TMP" ]]; then
RUNFILES_DIR="$RUNFILES_DIR_TMP"
fi

unset RUNFILES_DIR_TMP
fi

if [[ -n "$RUNFILES_DIR" ]] && [[ -d "$RUNFILES_DIR" ]]; then
Expand Down

0 comments on commit e36b6b2

Please sign in to comment.