mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-28 19:10:57 +12:00
Script generation fixes [release]
This commit is contained in:
parent
179ace133f
commit
ee6d4cb570
|
@ -61,26 +61,26 @@ public class ScriptHelper {
|
|||
|
||||
var applyRcCommand = t.applyRcFileCommand();
|
||||
if (applyRcCommand != null) {
|
||||
content = content + nl + applyRcCommand + nl;
|
||||
content += nl + applyRcCommand + nl;
|
||||
}
|
||||
|
||||
// We just apply the profile files always, as we can't be sure that they definitely have been applied.
|
||||
// Especially if we launch something that is not the system default shell
|
||||
var applyProfilesCommand = t.applyProfileFilesCommand();
|
||||
if (applyProfilesCommand != null) {
|
||||
content = content + nl + applyProfilesCommand + nl;
|
||||
content += nl + applyProfilesCommand + nl;
|
||||
}
|
||||
|
||||
if (displayName != null) {
|
||||
content = t.changeTitleCommand(displayName) + nl + content;
|
||||
content += nl + t.changeTitleCommand(displayName) + nl;
|
||||
}
|
||||
|
||||
content += String.join(nl, init.stream().filter(s -> s != null).toList()) + nl;
|
||||
content += nl + String.join(nl, init.stream().filter(s -> s != null).toList()) + nl;
|
||||
|
||||
if (toExecuteInShell != null) {
|
||||
// Normalize line endings
|
||||
content += String.join(nl, toExecuteInShell.lines().toList()) + nl;
|
||||
content += t.getExitCommand() + nl;
|
||||
content += nl + t.getExitCommand() + nl;
|
||||
}
|
||||
|
||||
return createExecScript(t, processControl, t.initFileName(processControl), content);
|
||||
|
|
Loading…
Reference in a new issue