╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1581 const admin_ssh_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKeIs8mJqigBZ5y84J4COgnAJJ5bHPKy+lM2SliMXbYm radar@roark"; │ │1582 │ │1583 // create the admin event repo with a user holding the dev SSH public key │ │1662 -fn setupAdmin(io: std.Io, allocator: std.mem.Allocator, data_dir_name: []const u8) !void { │ │1663 - const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │1664 - defer allocator.free(cwd_path); │ │1665 - │ │1666 - const admin_repo_path = try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "admin" }); │ │1584 +fn setupAdmin(io: std.Io, allocator: std.mem.Allocator, data_path: []const u8) !void { │ │1585 + const admin_repo_path = try std.fs.path.join(allocator, &.{ data_path, "admin" }); │ │1586 defer allocator.free(admin_repo_path); │ │1587 │ │1588 var repo = try rp.Repo(.xit, evt.admin_repo_opts).init(io, allocator, .{ .bare = true, .path = admin_repo_path });│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────╮ │1614 fn repoOnDiskPath( │ │1615 io: std.Io, │ │1616 allocator: std.mem.Allocator,│ │1698 - data_dir_name: []const u8, │ │1617 + data_path: []const u8, │ │1618 repo_name: []const u8, │ │1619 create: bool, │ │1620 ) !?[]u8 { │ ╰───────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1702 - const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │1703 - defer allocator.free(cwd_path); │ │1704 - │ │1705 - const admin_repo_path = try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "admin" });│ │1621 + const admin_repo_path = try std.fs.path.join(allocator, &.{ data_path, "admin" }); │ │1622 defer allocator.free(admin_repo_path); │ │1623 │ │1624 const event_id_hex = (try evt.resolveOrCreateRepo( │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1629 repo_name, │ │1630 if (create) .{ .read_access = .public } else null, │ │1631 )) orelse return null; │ │1716 - return try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "repos", &event_id_hex });│ │1632 + return try std.fs.path.join(allocator, &.{ data_path, "repos", &event_id_hex }); │ │1633 } │ │1634 │ │1635 // build the remote URL addressing admin/<repo_name> over the given transport │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────╮ │1655 fn sshCommand( │ │1656 is_ssh: bool, │ │1657 allocator: std.mem.Allocator,│ │1742 - cwd_path: []const u8, │ │1743 - temp_dir_name: []const u8, │ │1658 + temp_path: []const u8, │ │1659 port: u16, │ │1660 ) !?[]u8 { │ │1661 if (!is_ssh) return null; │ ╰───────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1662 │ │1748 - const priv_key_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "key" }); │ │1663 + const priv_key_path = try std.fs.path.join(allocator, &.{ temp_path, "key" }); │ │1664 defer allocator.free(priv_key_path); │ │1665 │ │1666 return try std.fmt.allocPrint(allocator, "ssh -p {} -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -o IdentitiesOnly=yes -o IdentityFile=\"{s}\"", .{ port + 1, priv_key_path });│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯