mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Fixes
This commit is contained in:
parent
409b24ff8a
commit
eb873f2225
2 changed files with 8 additions and 3 deletions
|
@ -33,7 +33,8 @@ public class ScriptHelper {
|
|||
WorkingDirectoryFunction workingDirectory,
|
||||
List<String> init,
|
||||
String toExecuteInShell,
|
||||
TerminalInitScriptConfig config)
|
||||
TerminalInitScriptConfig config,
|
||||
boolean exit)
|
||||
throws Exception {
|
||||
String nl = t.getNewLine().getNewLineString();
|
||||
var content = "";
|
||||
|
@ -71,7 +72,10 @@ public class ScriptHelper {
|
|||
if (toExecuteInShell != null) {
|
||||
// Normalize line endings
|
||||
content += String.join(nl, toExecuteInShell.lines().toList()) + nl;
|
||||
content += nl + t.getPassthroughExitCommand() + nl;
|
||||
}
|
||||
|
||||
if (exit) {
|
||||
content += nl + t.getPassthroughExitCommand();
|
||||
}
|
||||
|
||||
return createExecScript(t, processControl, new FilePath(t.initFileName(processControl)), content);
|
||||
|
|
|
@ -32,7 +32,8 @@ public class TerminalLauncher {
|
|||
title,
|
||||
type.shouldClear()
|
||||
&& AppPrefs.get().clearTerminalOnInit().get(),
|
||||
null));
|
||||
null),
|
||||
true);
|
||||
var config = new ExternalTerminalType.LaunchConfiguration(null, title, title, script, sc.getShellDialect());
|
||||
type.launch(config);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue