mirror of https://github.com/sbt/sbt.git
[2.x] fix: Skip native client for sbt new/init commands (#8512)
Fixes #7497
This commit is contained in:
parent
570ca30f69
commit
d4570e3359
|
|
@ -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=
|
||||
|
|
|
|||
5
sbt
5
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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue