test: create homedir before sandbox image mkdtemp

This commit is contained in:
Peter Steinberger
2026-02-22 12:35:38 +00:00
parent 96515a5729
commit 5b23159c4c

View File

@@ -207,7 +207,9 @@ describe("modelSupportsImages", () => {
describe("loadImageFromRef", () => {
it("allows sandbox-validated host paths outside default media roots", async () => {
const sandboxParent = await fs.mkdtemp(path.join(os.homedir(), "openclaw-sandbox-image-"));
const homeDir = os.homedir();
await fs.mkdir(homeDir, { recursive: true });
const sandboxParent = await fs.mkdtemp(path.join(homeDir, "openclaw-sandbox-image-"));
try {
const sandboxRoot = path.join(sandboxParent, "sandbox");
await fs.mkdir(sandboxRoot, { recursive: true });