More shell improvements

This commit is contained in:
crschnick 2023-03-18 06:43:36 +00:00
parent ae2b7289cc
commit 11667d7876
3 changed files with 3 additions and 4 deletions

View file

@ -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);

View file

@ -17,7 +17,6 @@ public interface CommandControl extends ProcessControl {
static enum TerminalExitMode {
KEEP_OPEN,
KEEP_OPEN_ON_FAILURE,
CLOSE
}

View file

@ -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);
}