We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a631b1b commit d6512dbCopy full SHA for d6512db
1 file changed
src/main/java/org/mcphackers/mcp/main/MainCLI.java
@@ -100,7 +100,12 @@ public MainCLI(String[] args) {
100
System.out.print(new Ansi().fgBrightCyan().a("> ").fgRgb(255,255,255));
101
String str = null;
102
try {
103
- str = consoleInput.nextLine();
+ if (consoleInput.hasNext()) {
104
+ str = consoleInput.nextLine();
105
+ } else {
106
+ // Only seems to occur during EOF, might occur in other cases?
107
+ System.exit(0);
108
+ }
109
} catch (NoSuchElementException ignored) {
110
}
111
if (str == null) {
0 commit comments