Merge pull request #5901 from eatkins/interaction-service-fix

Fix interaction service for thin client
This commit is contained in:
eugene yokota 2020-09-26 15:47:23 -04:00 committed by GitHub
commit 073b3047af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
}