From ac4a1cd8e0172b7add4491d86699734e49bba2c3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 14 Feb 2022 18:41:24 +1000 Subject: [PATCH] strip fully qualified bazel tools path tentative fix for https://forums.ankiweb.net/t/anki-2-1-50-beta-3/17501/17 --- tools/bazel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/bazel b/tools/bazel index 4e99266e6..955ce4a7a 100755 --- a/tools/bazel +++ b/tools/bazel @@ -15,6 +15,7 @@ fi # genrule() invocations like //:buildinfo, as they call 'bazel run python', which # fails as BAZEL_REAL is not passed to the child process. Work around it by removing # the tools folder from the path. -export PATH=$(echo "$PATH" | sed 's@^.*/tools:@@') +toolsPath=$(dirname $0) +export PATH=$(echo "$PATH" | sed "s@${toolsPath}:@@") exec $BAZEL_REAL $extra_args "$@"