diff --git a/launcher-package/src/universal/bin/sbt.bat b/launcher-package/src/universal/bin/sbt.bat index 13bdbb5d3..35587934f 100755 --- a/launcher-package/src/universal/bin/sbt.bat +++ b/launcher-package/src/universal/bin/sbt.bat @@ -926,6 +926,11 @@ for /f "delims=.-_ tokens=1-2" %%v in ("!JAVA_VERSION!") do ( rem parse the first two segments of sbt.version and set run_native_client to rem 1 if the user has also indicated they want to use native client. +rem sbt new/init should not use native client as it needs to run outside a project +if defined sbt_new ( + set run_native_client= + exit /B 0 +) set sbtV=!build_props_sbt_version! set sbtBinaryV_1= set sbtBinaryV_2= diff --git a/sbt b/sbt index 8bf51783a..a3a29ae20 100755 --- a/sbt +++ b/sbt @@ -805,6 +805,11 @@ detectNativeClient() { # Run native client if build.properties points to 1.4+ and has SBT_NATIVE_CLIENT isRunNativeClient() { + # sbt new/init should not use native client as it needs to run outside a project + if [[ "$sbt_new" == "true" ]]; then + echo "false" + return + fi sbtV="$build_props_sbt_version" [[ "$sbtV" == "" ]] && sbtV="$init_sbt_version" [[ "$sbtV" == "" ]] && sbtV="0.0.0"