This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 023c9b95af3 [fix][cli] Pulsar shell: handle ctrl-d (#17204)
023c9b95af3 is described below

commit 023c9b95af36f3cbccf32f93e8f8738565fb87f7
Author: Nicolò Boschi <[email protected]>
AuthorDate: Mon Aug 22 20:37:02 2022 +0200

    [fix][cli] Pulsar shell: handle ctrl-d (#17204)
---
 .../src/main/java/org/apache/pulsar/shell/PulsarShell.java             | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/pulsar-client-tools/src/main/java/org/apache/pulsar/shell/PulsarShell.java 
b/pulsar-client-tools/src/main/java/org/apache/pulsar/shell/PulsarShell.java
index e92f5a12ca0..4195edaf1f2 100644
--- a/pulsar-client-tools/src/main/java/org/apache/pulsar/shell/PulsarShell.java
+++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/shell/PulsarShell.java
@@ -395,7 +395,8 @@ public class PulsarShell {
                 try {
                     final String line = reader.readLine().trim();
                     return substituteVariables(reader.parseLine(line), 
variables);
-                } catch (org.jline.reader.UserInterruptException 
userInterruptException) {
+                } catch (org.jline.reader.UserInterruptException
+                        | org.jline.reader.EndOfFileException 
userInterruptException) {
                     throw new InterruptShellException();
                 }
             };

Reply via email to