[2.x] Improve --help (#9180)

**Problem**
Some runner options are not documented in --help.

**Solution**
Fix it.
This commit is contained in:
eugene yokota 2026-05-03 21:24:16 -04:00 committed by GitHub
parent 0de038e20b
commit 63d5a1103b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 17 deletions

View File

@ -1094,11 +1094,11 @@ echo.
echo -h ^| --help print this message
echo -v ^| --verbose this runner is chattier
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 compiler
echo --server run sbt server in the foreground, instead of using sbtn
echo --client run sbtn (native client), and start sbt server in the background
echo --no-server run sbtn, and fail if it cannot connect to a server
echo --jvm-client run JVM client, and start sbt server in the background
echo --allow-empty start sbt even if current directory contains no sbt project
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^)
@ -1136,6 +1136,11 @@ echo if this file exists, it is prepended to the runner ar
echo -Dkey=val pass -Dkey=val directly to the java runtime
echo -X^<flag^> pass -X^<flag^> directly to the java runtime
echo ^(e.g., -Xmx1G, -Xms512M, -Xss4M^)
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 compiler
rem echo -J-X pass option -X directly to the java runtime
rem echo ^(-J is stripped^)
rem echo -S-X add -X to sbt's scalacOptions ^(-S is stripped^)

20
sbt
View File

@ -645,22 +645,18 @@ Usage: `basename "$0"` [options]
-h | --help print this message
-v | --verbose this runner is chattier
-V | --version print sbt version information
--numeric-version print the numeric sbt version (sbt sbtVersion)
--script-version print the version of sbt script
shutdownall shutdown all running sbt-launch processes
-d | --debug set sbt log level to debug
-debug-inc | --debug-inc
enable extra debugging for the incremental compiler
--server run sbt server in the foreground, instead of using sbtn
--client run sbtn (native client), and start sbt server in the background
--no-server run sbtn, and fail if it cannot connect to a server
--jvm-client run JVM client, and start sbt server in the background
--allow-empty start sbt even if current directory contains no sbt project
--no-colors disable ANSI color codes
--color=auto|always|true|false|never
enable or disable ANSI color codes (sbt 1.3 and above)
--supershell=auto|always|true|false|never
enable or disable supershell (sbt 1.3 and above)
--traces generate Trace Event report on shutdown (sbt 1.3 and above)
--client run native client
--jvm-client run JVM client
--timings display task timings report on shutdown
--allow-empty start sbt even if current directory contains no sbt project
--sbt-dir <path> path to global settings/plugins directory (default: \$XDG_CONFIG_HOME/sbt or ~/.config/sbt)
--sbt-boot <path> path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
--sbt-cache <path> path to global cache directory (default: operating system specific)
@ -670,6 +666,12 @@ Usage: `basename "$0"` [options]
--no-global uses global caches, but does not use global ~/.sbt directory.
--jvm-debug <port> Turn on JVM debugging, open at the given port.
--batch disable interactive mode
--numeric-version print the numeric sbt version (sbt sbtVersion)
--script-version print the version of sbt script
shutdownall shutdown all running sbt-launch processes
-d | --debug set sbt log level to debug
-debug-inc | --debug-inc
enable extra debugging for the incremental compiler
# sbt version (default: from project/build.properties if present, else latest release)
--sbt-version <version> use the specified version of sbt

View File

@ -164,9 +164,9 @@ object Main:
| shutdownall shutdown all running sbt processes
| -d | --debug set sbt log level to debug
| --allow-empty start sbt even if current directory contains no sbt project
| --client run native client (sbt 1.4+)
| --server run JVM launcher (disable native client, sbt 2.x)
| --jvm-client run JVM client
| --client run sbtn (native client), and start sbt server in the background
| --server run sbt server in the foreground, instead of using sbtn
| --jvm-client run JVM client, and start sbt server in the background
| --mem <integer> set memory options (default: 1024)
| --sbt-version <v> use the specified version of sbt
| --sbt-jar <path> use the specified jar as the sbt launcher