diff --git a/spring-shell-core/src/main/java/org/springframework/shell/core/InteractiveShellRunner.java b/spring-shell-core/src/main/java/org/springframework/shell/core/InteractiveShellRunner.java index 62350d068..dda809439 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/core/InteractiveShellRunner.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/core/InteractiveShellRunner.java @@ -74,13 +74,14 @@ public void run(String[] args) throws Exception { String input; try { input = this.inputProvider.readInput(); - if (input.isEmpty()) { // ignore empty lines - continue; - } if (input == null || input.equalsIgnoreCase("quit") || input.equalsIgnoreCase("exit")) { print("Exiting the shell"); break; } + if (input.isEmpty()) { + // ignore empty lines + continue; + } } catch (Exception e) { if (this.debugMode) {