Permalink
Browse files

shell - handling EOF in shell.

Fixes #200
  • Loading branch information...
fcamblor committed Aug 26, 2017
1 parent 3db7d18 commit f061e73b33be4025a71809c2b266b5d6ec5f5678
Showing with 5 additions and 1 deletion.
  1. +5 −1 restx-shell/src/main/java/restx/shell/RestxShell.java
@@ -100,7 +100,11 @@ public void start() throws IOException {
boolean exit = false;
while (!exit) {
String line = consoleReader.readLine();
exit = exec(line);
if(line == null) { // line will be null when EOF, eg ctrl+c
exit = true;
} else {
exit = exec(line);
}
}
terminate();

0 comments on commit f061e73

Please sign in to comment.