Warn when using -sbt-launch-jar

This commit is contained in:
Adrien Piquerez 2021-07-14 10:23:44 +02:00
parent c9ca2d4afa
commit c31503cca2
1 changed files with 12 additions and 0 deletions

View File

@ -330,6 +330,18 @@ class NetworkClient(
val cmd = arguments.sbtLaunchJar match {
case Some(lj) =>
if (log) {
val sbtScript = if (Properties.isWin) "sbt.bat" else "sbt"
console.appendLog(Level.Warn, s"server is started using sbt-launch jar directly")
console.appendLog(
Level.Warn,
"this is not the recommended way: .sbtopts and .jvmopts files are not loaded and SBT_OPTS is ignored"
)
console.appendLog(
Level.Warn,
s"either upgrade $sbtScript to its latest version or make sure it is accessible from $$PATH, and run 'sbt bspConfig'"
)
}
List("java") ++ arguments.sbtArguments ++
List("-jar", lj, DashDashDetachStdio, DashDashServer)
case _ =>