Skip to content

Commit

Permalink
Add configurable repl options
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Rublev committed May 17, 2018
1 parent a88c97d commit 529ae2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scalalib/src/mill/scalalib/ScalaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,16 @@ trait ScalaModule extends JavaModule { outer =>
})()
}

def replOptions: T[Seq[String]] = T { Nil }

def repl() = T.command{
if (T.ctx().log.inStream == DummyInputStream){
Result.Failure("repl needs to be run with the -i/--interactive flag")
}else{
Jvm.interactiveSubprocess(
mainClass = "ammonite.Main",
classPath = ammoniteReplClasspath().map(_.path),
mainArgs = Nil,
mainArgs = replOptions(),
workingDir = pwd
)
Result.Success()
Expand Down

0 comments on commit 529ae2b

Please sign in to comment.