Skip to content

Commit

Permalink
shell - handling EOF in shell.
Browse files Browse the repository at this point in the history
Fixes #200
  • Loading branch information
fcamblor committed Aug 26, 2017
1 parent 3db7d18 commit f061e73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion restx-shell/src/main/java/restx/shell/RestxShell.java
Expand Up @@ -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();
Expand Down

0 comments on commit f061e73

Please sign in to comment.