mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-10-01 17:47:30 +13:00
Script generation fixes [release]
This commit is contained in:
parent
179ace133f
commit
ee6d4cb570
1 changed files with 5 additions and 5 deletions
|
@ -61,26 +61,26 @@ public class ScriptHelper {
|
||||||
|
|
||||||
var applyRcCommand = t.applyRcFileCommand();
|
var applyRcCommand = t.applyRcFileCommand();
|
||||||
if (applyRcCommand != null) {
|
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.
|
// 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
|
// Especially if we launch something that is not the system default shell
|
||||||
var applyProfilesCommand = t.applyProfileFilesCommand();
|
var applyProfilesCommand = t.applyProfileFilesCommand();
|
||||||
if (applyProfilesCommand != null) {
|
if (applyProfilesCommand != null) {
|
||||||
content = content + nl + applyProfilesCommand + nl;
|
content += nl + applyProfilesCommand + nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayName != null) {
|
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) {
|
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 += t.getExitCommand() + nl;
|
content += nl + t.getExitCommand() + nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return createExecScript(t, processControl, t.initFileName(processControl), content);
|
return createExecScript(t, processControl, t.initFileName(processControl), content);
|
||||||
|
|
Loading…
Reference in a new issue