diff --git a/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java b/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java index 6ab20ec66..a3ef547a7 100644 --- a/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java +++ b/terminal/src/main/java/org/jline/terminal/impl/exec/ExecTerminalProvider.java @@ -45,6 +45,9 @@ public String name() { } public Pty current(SystemStream systemStream) throws IOException { + if (!isSystemStream(systemStream)) { + throw new IOException("Not a system stream: " + systemStream); + } return ExecPty.current(this, systemStream); }