mirror of https://github.com/sbt/sbt.git
Fix interaction service for thin client
The global SimpleReader hardwires Terminal.console so it won't work with the ThinClient.
This commit is contained in:
parent
a79ef52f74
commit
6103444d5d
|
|
@ -12,7 +12,7 @@ import sbt.internal.util.{ SimpleReader, Terminal }
|
|||
trait CommandLineUIService extends InteractionService {
|
||||
override def readLine(prompt: String, mask: Boolean): Option[String] = {
|
||||
val maskChar = if (mask) Some('*') else None
|
||||
SimpleReader.readLine(prompt, maskChar)
|
||||
SimpleReader(Terminal.get).readLine(prompt, maskChar)
|
||||
}
|
||||
// TODO - Implement this better.
|
||||
override def confirm(msg: String): Boolean = {
|
||||
|
|
@ -21,7 +21,7 @@ trait CommandLineUIService extends InteractionService {
|
|||
(in == "y" || in == "yes")
|
||||
}
|
||||
}
|
||||
SimpleReader.readLine(msg + " (yes/no): ", None) match {
|
||||
SimpleReader(Terminal.get).readLine(msg + " (yes/no): ", None) match {
|
||||
case Some(Assent()) => true
|
||||
case _ => false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue