mirror of https://github.com/sbt/sbt.git
In canonical mode, System.in will return -1 for ctrl+d on an empty line. The result of this behavior was that if a user entered ctrl+d during run in a task that was reading from System.in, sbt would end up exiting whenever the task exited. This happened because the WriteableInputStream would close itself when it read -1 from the input stream, which it assumed meant that the underlying input stream itself had been closed. When the jline reader tried to read from the closed WriteableInputStream, it would throw an exception and if the line reader was for the console channel, it would be interpreted as the user had inputted ctrl+d in the sbt shell which is supposed to exit sbt. This change fixes that behavior so that sbt can continue reading input after the run task exits. |
||
|---|---|---|
| .. | ||
| util-collection | ||
| util-complete | ||
| util-control | ||
| util-interface/src/main/java/xsbti | ||
| util-logging | ||
| util-logic/src | ||
| util-position/src | ||
| util-relation/src | ||
| util-scripted/src/main | ||