Merge pull request #296 from er1c/debug-inc-usage

Add usage for --debug-inc to bash sbt, add impl to sbt.bat
This commit is contained in:
eugene yokota 2019-10-11 23:27:47 +02:00 committed by GitHub
commit 2c8fc74aec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -44,6 +44,12 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
()
}
test("sbt --debug-inc") {
val out = sbtProcess("compile --debug-inc -v").!!.linesIterator.toList
assert(out.contains[String]("-Dxsbt.inc.debug=true"))
()
}
test("sbt --supershell=never") {
val out = sbtProcess("compile --supershell=never -v").!!.linesIterator.toList
assert(out.contains[String]("-Dsbt.supershell=never"))

View File

@ -424,6 +424,8 @@ Usage: `basename "$0"` [options]
--numeric-version print the numeric sbt version (sbt sbtVersion)
--script-version print the version of sbt script
-d | --debug set sbt log level to debug
-debug-inc | --debug-inc
enable extra debugging for the incremental debugger
--no-colors disable ANSI color codes
--color=auto|always|true|false|never
enable or disable ANSI color codes (sbt 1.3 and above)

16
src/universal/bin/sbt.bat Normal file → Executable file
View File

@ -28,6 +28,7 @@ set sbt_args_print_sbt_version=
set sbt_args_print_sbt_script_version=
set sbt_args_verbose=
set sbt_args_debug=
set sbt_args_debug_inc=
set sbt_args_batch=
set sbt_args_color=
set sbt_args_no_colors=
@ -238,6 +239,15 @@ if defined _debug_arg (
goto args_loop
)
if "%~0" == "-debug-inc" set _debug_inc_arg=true
if "%~0" == "--debug-inc" set _debug_inc_arg=true
if defined _debug_inc_arg (
set _debug_inc_arg=
set sbt_args_debug_inc=1
goto args_loop
)
if "%~0" == "--sbt-version" set _sbt_version_arg=true
if "%~0" == "-sbt-version" set _sbt_version_arg=true
@ -439,6 +449,10 @@ goto end
rem set arguments
if defined sbt_args_debug_inc (
set _SBT_OPTS=-Dxsbt.inc.debug=true !_SBT_OPTS!
)
if defined sbt_args_no_colors (
set _SBT_OPTS=-Dsbt.log.noformat=true !_SBT_OPTS!
)
@ -723,6 +737,8 @@ echo -V ^| --version print sbt version information
echo --numeric-version print the numeric sbt version (sbt sbtVersion)
echo --script-version print the version of sbt script
echo -d ^| --debug set sbt log level to debug
echo -debug-inc ^| --debug-inc
echo enable extra debugging for the incremental debugger
echo --no-colors disable ANSI color codes
echo --color=auto^|always^|true^|false^|never
echo enable or disable ANSI color codes ^(sbt 1.3 and above^)