All files / shared/utils temp-paths.ts

83.33% Statements 5/6
83.33% Branches 5/6
100% Functions 1/1
83.33% Lines 5/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15        178x 178x 42x     136x 136x        
import { existsSync } from "node:fs";
import { tmpdir } from "node:os";
 
export function getFastTmpBaseDir(): string {
  const configuredTempDir = process.env.UNOSIM_SHARED_TEMP_DIR?.trim();
  if (configuredTempDir) {
    return configuredTempDir;
  }
 
  Eif (process.platform === "linux" && existsSync("/dev/shm")) {
    return "/dev/shm";
  }
  return tmpdir();
}