diff --git a/launcher-package/src/universal/bin/sbt.bat b/launcher-package/src/universal/bin/sbt.bat index fb325c19a..f44af2219 100755 --- a/launcher-package/src/universal/bin/sbt.bat +++ b/launcher-package/src/universal/bin/sbt.bat @@ -50,6 +50,7 @@ set sbt_args_sbt_dir= set sbt_args_sbt_version= set sbt_args_mem= set sbt_args_client= +set sbt_args_no_server= rem users can set SBT_OPTS via .sbtopts if exist .sbtopts for /F %%A in (.sbtopts) do ( @@ -205,6 +206,15 @@ if defined _no_colors_arg ( goto args_loop ) +if "%~0" == "-no-server" set _no_server_arg=true +if "%~0" == "--no-server" set _no_server_arg=true + +if defined _no_server_arg ( + set _no_server_arg= + set sbt_args_no_server=1 + goto args_loop +) + if "%~0" == "-no-global" set _no_global_arg=true if "%~0" == "--no-global" set _no_global_arg=true @@ -646,6 +656,10 @@ if defined sbt_args_traces ( set _SBT_OPTS=-Dsbt.traces=true !_SBT_OPTS! ) +if defined sbt_args_no_server ( + set _SBT_OPTS=-Dsbt.io.virtual=false -Dsbt.server.autostart=false !_SBT_OPTS! +) + rem TODO: _SBT_OPTS needs to be processed as args and diffed against SBT_ARGS if !sbt_args_print_sbt_version! equ 1 ( diff --git a/sbt b/sbt index c14c2ec32..39b1dac32 100755 --- a/sbt +++ b/sbt @@ -22,6 +22,7 @@ declare sbt_verbose= declare sbt_debug= declare build_props_sbt_version= declare use_sbtn= +declare no_server= declare sbtn_command="$SBTN_CMD" declare sbtn_version="1.4.7" @@ -631,6 +632,7 @@ map_args () { -traces|--traces) options=( "${options[@]}" "-Dsbt.traces=true" ) && shift ;; --supershell=*) options=( "${options[@]}" "-Dsbt.supershell=${1:13}" ) && shift ;; -supershell=*) options=( "${options[@]}" "-Dsbt.supershell=${1:12}" ) && shift ;; + -no-server|--no-server) options=( "${options[@]}" "-Dsbt.io.virtual=false" "-Dsbt.server.autostart=false" ) && shift ;; --color=*) options=( "${options[@]}" "-Dsbt.color=${1:8}" ) && shift ;; -color=*) options=( "${options[@]}" "-Dsbt.color=${1:7}" ) && shift ;; -no-share|--no-share) options=( "${options[@]}" "${noshare_opts[@]}" ) && shift ;;