From 14d92b76eb7bcec1fb4d424823c6176adecae0d0 Mon Sep 17 00:00:00 2001 From: Eruis2579 Date: Tue, 10 Feb 2026 10:35:00 +0100 Subject: [PATCH] fix: Read build.properties in --version handler to ensure version is available (#8717) Ensure build_props_sbt_version is read when handling --version flag, matching the behavior in the batch file and fixing potential CI test failures. --- sbt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbt b/sbt index 9b1b87186..396e12102 100755 --- a/sbt +++ b/sbt @@ -912,6 +912,9 @@ fi # Handle --version before native client so it works on sbt 2.x project dirs (#8717) if [[ $print_version ]]; then detect_working_directory + if [[ -n "$is_this_dir_sbt" ]] && [[ -f ./project/build.properties ]]; then + loadPropFile ./project/build.properties + fi if [[ -n "$is_this_dir_sbt" ]] && [[ -n "$build_props_sbt_version" ]]; then echo "sbt version in this project: $build_props_sbt_version" fi