@@ -117,6 +117,16 @@ object Repl extends ScalaCommand[ReplOptions] {
117
117
case Right (()) =>
118
118
}
119
119
}
120
+ def doRunReplFromBuild (
121
+ build : Build .Successful ,
122
+ allowExit : Boolean
123
+ ): Unit =
124
+ doRunRepl(
125
+ build.options,
126
+ build.artifacts,
127
+ build.outputOpt,
128
+ allowExit
129
+ )
120
130
121
131
val cross = options.sharedRepl.compileCross.cross.getOrElse(false )
122
132
val configDb = options.shared.configDb
@@ -154,10 +164,9 @@ object Repl extends ScalaCommand[ReplOptions] {
154
164
) { res =>
155
165
for (builds <- res.orReport(logger))
156
166
builds.main match {
157
- case s : Build .Successful =>
158
- doRunRepl(s.options, s.artifacts, s.outputOpt, allowExit = false )
159
- case _ : Build .Failed => buildFailed(allowExit = false )
160
- case _ : Build .Cancelled => buildCancelled(allowExit = false )
167
+ case s : Build .Successful => doRunReplFromBuild(s, allowExit = false )
168
+ case _ : Build .Failed => buildFailed(allowExit = false )
169
+ case _ : Build .Cancelled => buildCancelled(allowExit = false )
161
170
}
162
171
}
163
172
try WatchUtil .waitForCtrlC()
@@ -178,10 +187,9 @@ object Repl extends ScalaCommand[ReplOptions] {
178
187
)
179
188
.orExit(logger)
180
189
builds.main match {
181
- case s : Build .Successful =>
182
- doRunRepl(s.options, s.artifacts, s.outputOpt, allowExit = true )
183
- case _ : Build .Failed => buildFailed(allowExit = true )
184
- case _ : Build .Cancelled => buildCancelled(allowExit = true )
190
+ case s : Build .Successful => doRunReplFromBuild(s, allowExit = true )
191
+ case _ : Build .Failed => buildFailed(allowExit = true )
192
+ case _ : Build .Cancelled => buildCancelled(allowExit = true )
185
193
}
186
194
}
187
195
}
0 commit comments