mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
More shell improvements
This commit is contained in:
parent
ae2b7289cc
commit
11667d7876
3 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -17,7 +17,6 @@ public interface CommandControl extends ProcessControl {
|
|||
|
||||
static enum TerminalExitMode {
|
||||
KEEP_OPEN,
|
||||
KEEP_OPEN_ON_FAILURE,
|
||||
CLOSE
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue