Small fixes

This commit is contained in:
crschnick 2023-05-22 20:24:47 +00:00
parent cdb0d02ad5
commit 442f8f7324
2 changed files with 4 additions and 3 deletions

View file

@ -55,13 +55,13 @@ public class ScriptHelper {
var applyRcCommand = t.applyRcFileCommand();
if (applyRcCommand != null) {
content = content + "\n" + applyRcCommand;
content = content + "\n" + applyRcCommand + "\n";
}
if (login) {
var applyProfilesCommand = t.applyProfileFilesCommand();
if (applyProfilesCommand != null) {
content = content + "\n" + applyProfilesCommand;
content = content + "\n" + applyProfilesCommand + "\n";
}
}

View file

@ -19,7 +19,8 @@ public class XPipeTempDirectory {
var arr = Stream.concat(Stream.of(base, "xpipe"), Arrays.stream(sub)).toArray(String[]::new);
var dir = FileNames.join(arr);
if (!proc.getShellDialect().createFileExistsCommand(proc, dir).executeAndCheck()) {
var existsCommand = proc.getShellDialect().createFileExistsCommand(proc, dir);
if (!existsCommand.executeAndCheck()) {
proc.executeSimpleCommand(
proc.getShellDialect().getMkdirsCommand(dir),
"Unable to access or create temporary directory " + dir);