From 08aa64e703dfde9f840049a01dbbd7e851f25719 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Tue, 6 Oct 2020 08:31:44 -0700 Subject: [PATCH] Restore terminal prompt for some dumb terminals A user reported that no prompt was displayed when they used sbt from the jEdit console. The reason no prompt was displayed was because System.console was null which caused the ConsoleChannel to be initialized with its prompt set to NoPrompt. I don't remember why it was doing this but this bug seems worse than whatever it was trying to address. --- main-command/src/main/scala/sbt/internal/ConsoleChannel.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/main-command/src/main/scala/sbt/internal/ConsoleChannel.scala b/main-command/src/main/scala/sbt/internal/ConsoleChannel.scala index 397dba7a0..dac0c9565 100644 --- a/main-command/src/main/scala/sbt/internal/ConsoleChannel.scala +++ b/main-command/src/main/scala/sbt/internal/ConsoleChannel.scala @@ -25,7 +25,6 @@ private[sbt] final class ConsoleChannel( override val userThread: UserThread = new UserThread(this) private[sbt] def terminal = Terminal.console - if (System.console == null) terminal.setPrompt(Prompt.NoPrompt) } private[sbt] object ConsoleChannel { private[sbt] def defaultName = "console0"