From a1ec6cb422bfad5c58d9334ed7438cbb42991e54 Mon Sep 17 00:00:00 2001 From: crschnick Date: Fri, 19 Jan 2024 17:25:18 +0000 Subject: [PATCH] Allow for finer control of write logging --- core/src/main/java/io/xpipe/core/process/ProcessControl.java | 2 ++ core/src/main/java/io/xpipe/core/process/ShellControl.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/xpipe/core/process/ProcessControl.java b/core/src/main/java/io/xpipe/core/process/ProcessControl.java index eb7bc424..af04754c 100644 --- a/core/src/main/java/io/xpipe/core/process/ProcessControl.java +++ b/core/src/main/java/io/xpipe/core/process/ProcessControl.java @@ -28,6 +28,8 @@ public interface ProcessControl extends AutoCloseable { void writeLine(String line) throws IOException; + void writeLine(String line, boolean log) throws IOException; + void write(byte[] b) throws IOException; @Override diff --git a/core/src/main/java/io/xpipe/core/process/ShellControl.java b/core/src/main/java/io/xpipe/core/process/ShellControl.java index 1c35787e..480ebdb6 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellControl.java +++ b/core/src/main/java/io/xpipe/core/process/ShellControl.java @@ -208,7 +208,9 @@ public interface ShellControl extends ProcessControl { ShellControl subShell( FailableFunction command, TerminalOpenFunction terminalCommand); - void executeLine(String command) throws Exception; + void writeLineAndReadEcho(String command) throws Exception; + + void writeLineAndReadEcho(String command, boolean log) throws Exception; void cd(String directory) throws Exception;