awrb commented on code in PR #1627:
URL: https://github.com/apache/karaf/pull/1627#discussion_r979316955


##########
shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java:
##########
@@ -451,7 +449,12 @@ private CharSequence readCommand(AtomicBoolean reading) 
throws UserInterruptExce
                 command = reader.getBuffer().toString();
             }
         } catch (EndOfFileException e) {
-            command = null;
+            boolean disableEofExit = (boolean) 
session.get(Session.DISABLE_EOF_EXIT);
+            if (disableEofExit) {
+                command = "";

Review Comment:
   I tested it manually and it works fine but I couldn't figure out a way to 
write a test for this (e.g. how to send CTRL-D to Karaf in a pax exam test, or 
some other way)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to