mirror of https://github.com/sbt/sbt.git
Ensure sbtConfig argv does not need sbt in PATH
Before, the BSP config .bsp/sbt.json generated by `sbt bspConfig` contained a command line which required the sbt binary in the PATH. This fix changes the nature of the -Dsbt.script option. It was an argument of the main class xsbt.boot.Boot, it's now a system property and thus it's used to launch the sbt server. Fixes https://github.com/sbt/sbt/issues/6760
This commit is contained in:
parent
450c87f576
commit
780665a60c
|
|
@ -49,9 +49,11 @@ object BuildServerConnection {
|
|||
"-Xmx100m",
|
||||
"-classpath",
|
||||
classPath,
|
||||
"xsbt.boot.Boot",
|
||||
"-bsp"
|
||||
) ++ sbtScript.orElse(sbtLaunchJar)
|
||||
) ++
|
||||
sbtScript ++
|
||||
Vector("xsbt.boot.Boot", "-bsp") ++
|
||||
(if (sbtScript.isEmpty) sbtLaunchJar else None)
|
||||
|
||||
val details = BspConnectionDetails(name, sbtVersion, bspVersion, languages, argv)
|
||||
val json = Converter.toJson(details).get
|
||||
IO.write(bspConnectionFile, CompactPrinter(json), append = false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue