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
0f8ac0f543
commit
990fa9530f
|
|
@ -49,9 +49,11 @@ object BuildServerConnection {
|
||||||
"-Xmx100m",
|
"-Xmx100m",
|
||||||
"-classpath",
|
"-classpath",
|
||||||
classPath,
|
classPath,
|
||||||
"xsbt.boot.Boot",
|
) ++
|
||||||
"-bsp"
|
sbtScript ++
|
||||||
) ++ sbtScript.orElse(sbtLaunchJar)
|
Vector("xsbt.boot.Boot", "-bsp") ++
|
||||||
|
(if (sbtScript.isEmpty) sbtLaunchJar else None)
|
||||||
|
|
||||||
val details = BspConnectionDetails(name, sbtVersion, bspVersion, languages, argv)
|
val details = BspConnectionDetails(name, sbtVersion, bspVersion, languages, argv)
|
||||||
val json = Converter.toJson(details).get
|
val json = Converter.toJson(details).get
|
||||||
IO.write(bspConnectionFile, CompactPrinter(json), append = false)
|
IO.write(bspConnectionFile, CompactPrinter(json), append = false)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue