Fix posix askpass

This commit is contained in:
crschnick 2023-04-20 07:06:13 +00:00
parent 73131a3f0c
commit 0f306a5d50

View file

@ -176,7 +176,13 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
var suffix = file.equals(pc.getShellDialect().getOpenCommand())
? "\"\""
: "\"" + file.replaceAll("\"", "\\\\\"") + "\"";
var cmd = "osascript -e 'tell app \"" + "Terminal" + "\" to do script " + suffix + "'";
var cmd = String.format(
"""
osascript - "$@" <<EOF
activate application "Terminal"
tell app "Terminal" to do script %s
EOF""",
suffix);
pc.executeSimpleCommand(cmd);
}
}