mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-24 18:26:54 +00:00
Various small improvements [release]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user