Skip to content

Commit

Permalink
Resolve runfiles correctly when bazel enabled (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
mollyibot authored Nov 10, 2023
1 parent f19dc96 commit ac78ac8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions third_party/phantomjs/phantomjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@
# export FC_DEBUG="1024"

if [[ -d "$0.runfiles" ]]; then
RUNFILES="$0.runfiles/io_bazel_rules_closure"
if [[ -f "$0.runfiles/../_repo_mapping" ]]; then
RUNFILES="$0.runfiles/"
else
RUNFILES="$0.runfiles/io_bazel_rules_closure"
fi
else
RUNFILES="${PWD}/../io_bazel_rules_closure"
if [[ -f "${PWD}/../_repo_mapping" ]]; then
RUNFILES="${PWD}/"
else
RUNFILES="${PWD}/../io_bazel_rules_closure"
fi
fi

export LD_LIBRARY_PATH="${RUNFILES}/third_party/fontconfig/k8:${LD_LIBRARY_PATH}"
Expand Down

0 comments on commit ac78ac8

Please sign in to comment.