╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │74 test "sync creates missing event branches and preserves head" { │ │75 const io = std.testing.io; │ │76 const allocator = std.testing.allocator; │ │77 - const cwd = std.Io.Dir.cwd(); │ │78 - const temp_dir_name = "temp-ui-sync"; │ │77 │ │80 - cwd.deleteTree(io, temp_dir_name) catch {}; │ │81 - var temp_dir = try cwd.createDirPathOpen(io, temp_dir_name, .{}); │ │82 - defer cwd.deleteTree(io, temp_dir_name) catch {}; │ │83 - defer temp_dir.close(io); │ │78 + var temp = std.testing.tmpDir(.{}); │ │79 + defer temp.cleanup(); │ │80 + const temp_path = try temp.dir.realPathFileAlloc(io, ".", allocator); │ │81 + defer allocator.free(temp_path); │ │82 │ │85 - const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │86 - defer allocator.free(cwd_path); │ │87 - const local_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "local" }); │ │83 + const local_path = try std.fs.path.join(allocator, &.{ temp_path, "local" }); │ │84 defer allocator.free(local_path); │ │89 - const remote_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "remote" });│ │85 + const remote_path = try std.fs.path.join(allocator, &.{ temp_path, "remote" }); │ │86 defer allocator.free(remote_path); │ │87 │ │88 const Repo = xit.repo.Repo(.git, .{}); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯