From 29548d7628f69df06701ec69dc46d1af838d241d Mon Sep 17 00:00:00 2001 From: Eric Peters Date: Thu, 19 Dec 2019 16:14:37 -0800 Subject: [PATCH] Tweak sbt.bat to parse the -debug arguments first --- src/universal/bin/sbt.bat | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/universal/bin/sbt.bat b/src/universal/bin/sbt.bat index c05b63d64..d9a467801 100755 --- a/src/universal/bin/sbt.bat +++ b/src/universal/bin/sbt.bat @@ -121,6 +121,17 @@ shift if [%0] EQU [] goto args_end set g=%~0 +rem make sure the sbt_args_debug gets set first incase any argument parsing uses :dlog +if "%~0" == "-d" set _debug_arg=true +if "%~0" == "--debug" set _debug_arg=true + +if defined _debug_arg ( + set _debug_arg= + set sbt_args_debug=1 + set SBT_ARGS=-debug !SBT_ARGS! + goto args_loop +) + if "%~0" == "-h" goto usage if "%~0" == "-help" goto usage if "%~0" == "--help" goto usage @@ -255,16 +266,6 @@ if defined _sbt_ivy_arg ( ) ) -if "%~0" == "-d" set _debug_arg=true -if "%~0" == "--debug" set _debug_arg=true - -if defined _debug_arg ( - set _debug_arg= - set sbt_args_debug=1 - set SBT_ARGS=-debug !SBT_ARGS! - goto args_loop -) - if "%~0" == "-debug-inc" set _debug_inc_arg=true if "%~0" == "--debug-inc" set _debug_inc_arg=true