Merge pull request #6016 from eatkins/windows-echo

Fix console echo for windows batch commands
This commit is contained in:
eugene yokota 2020-10-24 13:55:49 -04:00 committed by GitHub
commit a09e6e2a25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -796,6 +796,12 @@ object Terminal {
private[util] val system: org.jline.terminal.Terminal,
) extends TerminalImpl(in, out, originalErr, "console0") {
private[this] val rawMode = new AtomicBoolean(false)
if (Util.isWindows && hasConsole) {
// It is necessary to enter and exit raw mode in order to get the windows
// console to echo input.
enterRawMode()
exitRawMode()
}
override private[sbt] def getSizeImpl: (Int, Int) = {
val size = system.getSize
(size.getColumns, size.getRows)