diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index c6ce62ec..bb6054f9 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -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"; } } diff --git a/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java b/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java index b9e186d3..976d6d3e 100644 --- a/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java +++ b/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java @@ -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);