Various small improvements [release]

This commit is contained in:
crschnick
2023-03-15 23:51:25 +00:00
parent ba56fc25ab
commit 6e39480537
3 changed files with 12 additions and 4 deletions
@@ -144,7 +144,14 @@ public interface OsType {
@Override
public String getTempDirectory(ShellControl pc) throws Exception {
return pc.executeStringSimpleCommand(pc.getShellDialect().getPrintVariableCommand("TMPDIR"));
var found = pc.executeStringSimpleCommand(pc.getShellDialect().getPrintVariableCommand("TMPDIR"));
// This variable is not defined for root users, so manually fix it. Why? ...
if (found.isBlank()) {
return "/tmp";
}
return found;
}
@Override