From 0b9c62b2851c6aeb3737bc27de3a6da003d4c209 Mon Sep 17 00:00:00 2001 From: crschnick Date: Sun, 13 Oct 2024 09:09:25 +0000 Subject: [PATCH] Fix some logging issues --- app/src/main/java/io/xpipe/app/util/TerminalLauncher.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java b/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java index 9e7f58010..aab915af7 100644 --- a/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java +++ b/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java @@ -66,9 +66,10 @@ public class TerminalLauncher { var prefix = entry != null && color != null && type.supportsColoredTitle() ? color.getEmoji() + " " : ""; var cleanTitle = (title != null ? title : entry != null ? entry.getName() : "?"); var adjustedTitle = prefix + cleanTitle; + var log = AppPrefs.get().enableTerminalLogging().get(); var terminalConfig = new TerminalInitScriptConfig( adjustedTitle, - type.shouldClear() && AppPrefs.get().clearTerminalOnInit().get(), + !log && type.shouldClear() && AppPrefs.get().clearTerminalOnInit().get(), cc instanceof ShellControl ? type.additionalInitCommands() : TerminalInitFunction.none()); var request = UUID.randomUUID(); var config = createConfig(request, entry, cleanTitle, adjustedTitle); @@ -129,7 +130,7 @@ public class TerminalLauncher { } else { var content = """ - script --command "%s" "%s" + script --quiet --command "%s" "%s" """ .formatted(preparationScript, logFile); var ps = ScriptHelper.createExecScript(sc.getShellDialect(), sc, content);