From dedc6cd3334825415b95a7ff94c7ef4d5834346d Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Fri, 3 May 2024 14:42:59 +0200 Subject: [PATCH] Specify version for bazelisk via `USE_BAZEL_VERSION` bazelisk does not read the `.bazelversion` file when there is no WORKSPACE and first fetches the latest Bazel version, which causes a warning and later fetches the Bazel version specified in the `.bazelversion` file. See https://github.com/bazelbuild/bazelisk/issues/523 --- rules_haskell_tests/tests/run-start-script.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rules_haskell_tests/tests/run-start-script.sh b/rules_haskell_tests/tests/run-start-script.sh index e7ea85542..27200c7e6 100755 --- a/rules_haskell_tests/tests/run-start-script.sh +++ b/rules_haskell_tests/tests/run-start-script.sh @@ -14,6 +14,11 @@ rm -rf $workdir mkdir $workdir cd $workdir cp "$rules_haskell_dir/.bazelversion" . + +# specify version for bazelisk via `USE_BAZEL_VERSION`, since it does not read the .bazelversion when there is no WORKSPACE file +USE_BAZEL_VERSION=$( cat .bazelversion ) +export USE_BAZEL_VERSION + # arguments are passed on to the start script "$rules_haskell_dir/start" "$@"