From 11667d78765221d06a5c6d006581e310f2829c2d Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 18 Mar 2023 06:43:36 +0000 Subject: [PATCH] More shell improvements --- app/src/main/java/io/xpipe/app/util/ScriptHelper.java | 2 +- core/src/main/java/io/xpipe/core/process/CommandControl.java | 1 - core/src/main/java/io/xpipe/core/process/ShellDialect.java | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index 22b568f02..fde6b5c91 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -132,7 +132,7 @@ public class ScriptHelper { } private static String createAskPassScript(SecretValue pass, ShellControl parent, ShellDialect type) throws Exception { - var content = type.getSelfdeleteScriptEchoCommand(pass.getSecretValue()); + var content = type.getSelfdeleteEchoScriptContent(pass.getSecretValue()); var temp = parent.getTemporaryDirectory(); var file = FileNames.join(temp, "askpass-" + getScriptId() + "." + type.getScriptFileEnding()); return createExecScript(parent, file, content); diff --git a/core/src/main/java/io/xpipe/core/process/CommandControl.java b/core/src/main/java/io/xpipe/core/process/CommandControl.java index 6f7a03bb8..7ee42807e 100644 --- a/core/src/main/java/io/xpipe/core/process/CommandControl.java +++ b/core/src/main/java/io/xpipe/core/process/CommandControl.java @@ -17,7 +17,6 @@ public interface CommandControl extends ProcessControl { static enum TerminalExitMode { KEEP_OPEN, - KEEP_OPEN_ON_FAILURE, CLOSE } diff --git a/core/src/main/java/io/xpipe/core/process/ShellDialect.java b/core/src/main/java/io/xpipe/core/process/ShellDialect.java index ffefb403c..d055ffaa1 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellDialect.java +++ b/core/src/main/java/io/xpipe/core/process/ShellDialect.java @@ -13,7 +13,7 @@ import java.util.stream.Stream; @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") public interface ShellDialect { - String argument(String s); + String fileArgument(String s); default String applyRcFileCommand() { return null; @@ -71,7 +71,7 @@ public interface ShellDialect { String getMakeExecutableCommand(String file); - default String getSelfdeleteScriptEchoCommand(String s) { + default String getSelfdeleteEchoScriptContent(String s) { return getEchoCommand(s, false); }