Skip to content

Commit

Permalink
Specify version for bazelisk via USE_BAZEL_VERSION
Browse files Browse the repository at this point in the history
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 bazelbuild/bazelisk#523
  • Loading branch information
avdv committed May 14, 2024
1 parent a5c1a4c commit dedc6cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rules_haskell_tests/tests/run-start-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" "$@"

Expand Down

0 comments on commit dedc6cd

Please sign in to comment.