Filter out DashDashServer for command arguments

sbt exits abruptly when run with --server.
This commit is contained in:
Ethan Atkins 2020-09-17 19:35:24 -07:00
parent 4cea09937c
commit f4c49a09d2
1 changed files with 2 additions and 2 deletions

View File

@ -227,11 +227,11 @@ object StandardMain {
// This is to workaround https://github.com/sbt/io/issues/110
sys.props.put("jna.nosys", "true")
import BasicCommandStrings.isEarlyCommand
import BasicCommandStrings.{ DashDashDetachStdio, DashDashServer, isEarlyCommand }
val userCommands =
configuration.arguments
.map(_.trim)
.filterNot(_ == BasicCommandStrings.DashDashDetachStdio)
.filterNot(c => c == DashDashDetachStdio || c == DashDashServer)
val (earlyCommands, normalCommands) = (preCommands ++ userCommands).partition(isEarlyCommand)
val commands = (earlyCommands ++ normalCommands).toList map { x =>
Exec(x, None)