Skip to content

Commit 90e6038

Browse files
author
Rajesh Veeranki
committed
Use Option[String] instead of Array[String] for initialCommands Repl
1 parent f1d9f9c commit 90e6038

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/src/dotty/tools/repl/ReplDriver.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ case class Completions(cursor: Int,
7878
class ReplDriver(settings: Array[String],
7979
protected val out: PrintStream = System.out,
8080
protected val classLoader: Option[ClassLoader] = None,
81-
initialCommands: Array[String] = Array.empty,
82-
cleanupCommands: Array[String] = Array.empty) extends Driver {
81+
initialCommands: Option[String] = None,
82+
cleanupCommands: Option[String] = None) extends Driver {
8383

8484
/** Overridden to `false` in order to not have to give sources on the
8585
* commandline
@@ -153,7 +153,7 @@ class ReplDriver(settings: Array[String],
153153
final def run(res: ParseResult)(implicit state: State): State =
154154
interpret(res)
155155

156-
final def runBootstrapCommands(cmds: Array[String])(implicit state: State): State = {
156+
final def runBootstrapCommands(cmds: Option[String])(implicit state: State): State = {
157157
cmds.map(ParseResult.apply(_)(rootCtx)).map(Silent.apply(_)).foldLeft(state) { (s, cmd) =>
158158
interpret(cmd)(s)
159159
}

sbt-bridge/src/xsbt/ConsoleInterface.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class ConsoleInterface {
1919
def run(args: Array[String],
2020
bootClasspathString: String,
2121
classpathString: String,
22-
initialCommands: Array[String],
23-
cleanupCommands: Array[String],
22+
initialCommands: Option[String],
23+
cleanupCommands: Option[String],
2424
loader: ClassLoader,
2525
bindNames: Array[String],
2626
bindValues: Array[Any],

0 commit comments

Comments
 (0)