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