mirror of https://github.com/sbt/sbt.git
Tidy up -debug in SBT_OPTS for submission
This commit is contained in:
parent
4872ddf3ef
commit
1bc60adbe7
|
|
@ -138,10 +138,13 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
|||
}
|
||||
|
||||
test("sbt with -debug in SBT_OPTS appears in sbt commands") {
|
||||
if (isWindows) cancel("Test not supported on windows")
|
||||
|
||||
val out: List[String] = sbtProcessWithOpts("compile", "-v")("", "-debug").!!.linesIterator.toList
|
||||
// Debug argument must appear in the 'commands' section after sbt-launch.jar to work
|
||||
// Debug argument must appear in the 'commands' section (after the sbt-launch.jar argument) to work
|
||||
val sbtLaunchMatcher = """^.+sbt-launch.jar["]{0,1}$""".r
|
||||
val locationOfSbtLaunchJarArg = out.zipWithIndex.collectFirst {
|
||||
case (arg, index) if arg.endsWith("sbt-launch.jar") => index
|
||||
case (arg, index) if sbtLaunchMatcher.findFirstIn(arg).nonEmpty => index
|
||||
}
|
||||
|
||||
assert(locationOfSbtLaunchJarArg.nonEmpty)
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ addJava () {
|
|||
java_args=( "${java_args[@]}" "$1" )
|
||||
}
|
||||
addSbt () {
|
||||
echoerr "[addSbt] arg = '$1'"
|
||||
dlog "[addSbt] arg = '$1'"
|
||||
sbt_commands=( "${sbt_commands[@]}" "$1" )
|
||||
}
|
||||
addResidual () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue