From 63eabf3c8fd0e04a476df22a36879bb49f9bfddd Mon Sep 17 00:00:00 2001 From: Eric Peters Date: Sun, 17 Nov 2019 08:32:28 -0800 Subject: [PATCH 1/2] Update sbt.bat --script-version to execute early and avoid java check/robocopy bootstrap - Fixes #5220 --- integration-test/src/test/scala/RunnerTest.scala | 2 +- src/universal/bin/sbt.bat | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integration-test/src/test/scala/RunnerTest.scala b/integration-test/src/test/scala/RunnerTest.scala index d3dc0c580..f64685497 100755 --- a/integration-test/src/test/scala/RunnerTest.scala +++ b/integration-test/src/test/scala/RunnerTest.scala @@ -161,7 +161,7 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions { } test("sbt --script-version should print sbtVersion") { - val out = sbtProcessWithOpts("--numeric-version", "", "").!!.trim + val out = sbtProcessWithOpts("--script-version", "", "").!!.trim val expectedVersion = "^"+versionRegEx+"$" assert(out.matches(expectedVersion)) () diff --git a/src/universal/bin/sbt.bat b/src/universal/bin/sbt.bat index 417b79ad3..c05b63d64 100755 --- a/src/universal/bin/sbt.bat +++ b/src/universal/bin/sbt.bat @@ -459,8 +459,6 @@ goto args_loop rem Confirm a user's intent if the current directory does not look like an sbt rem top-level directory and the "new" command was not given. -rem TODO: if not -sbt-create - if not defined sbt_args_sbt_create if not defined sbt_args_print_version if not defined sbt_args_print_sbt_version if not defined sbt_args_print_sbt_script_version if not exist build.sbt ( if not exist project\ ( if not defined sbt_new ( @@ -486,6 +484,13 @@ if not defined sbt_args_sbt_create if not defined sbt_args_print_version if not call :process +rem avoid bootstrapping/java version check for script version + +if !sbt_args_print_sbt_script_version! equ 1 ( + echo !init_sbt_version! + goto :eof +) + call :checkjava call :copyrt @@ -569,11 +574,6 @@ set sbt_jar=!sbt_jar:"=! rem TODO: _SBT_OPTS needs to be processed as args and diffed against SBT_ARGS -if !sbt_args_print_sbt_script_version! equ 1 ( - echo !init_sbt_version! - goto :eof -) - if !sbt_args_print_sbt_version! equ 1 ( call :set_sbt_version echo !sbt_version! From 8122bd7020a562e263a8f1aff02df90dc413ae58 Mon Sep 17 00:00:00 2001 From: Eric Peters Date: Sun, 17 Nov 2019 11:49:58 -0800 Subject: [PATCH 2/2] Update citest to use 1.3.0 release --- citest/project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/citest/project/build.properties b/citest/project/build.properties index c491602bb..080a737ed 100644 --- a/citest/project/build.properties +++ b/citest/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.0-M4 +sbt.version=1.3.0