authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-29 05:31:48 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-29 05:31:48 -07:00
log574723d4fd9c43360805c462feda8a342f4aba77
treebdb05d360545e419f79d2547f4331bc42c9db441
parent1188d0979cfdf1cd3d2296c07c2ca6a798663b7c
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

cmd/install: dont .? cachepath


1 files changed, 2 insertions(+), 2 deletions(-)

src/cmd/install.zig+2-2
...@@ -14,7 +14,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {...@@ -14,7 +14,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
14 if (args.len < 2) u.fail("usage: zigmod install [git|hg|http] [url]", .{});14 if (args.len < 2) u.fail("usage: zigmod install [git|hg|http] [url]", .{});
1515
16 const homepath = try knownfolders.getPath(gpa, .home) orelse u.fail("failed to read HOME", .{});16 const homepath = try knownfolders.getPath(gpa, .home) orelse u.fail("failed to read HOME", .{});
17 const cache = try knownfolders.getPath(gpa, .cache);17 const cache = try knownfolders.getPath(gpa, .cache) orelse u.fail("failed to read XDG_CACHE_HOME", .{});
18 const datapath = try knownfolders.getPath(gpa, .data) orelse u.fail("failed to read XDG_DATA_HOME", .{});18 const datapath = try knownfolders.getPath(gpa, .data) orelse u.fail("failed to read XDG_DATA_HOME", .{});
1919
20 const RemoteType = enum {20 const RemoteType = enum {
...@@ -47,7 +47,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {...@@ -47,7 +47,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
47 .for_build = false,47 .for_build = false,
48 };48 };
49 const clean_path = try dep.clean_path(gpa);49 const clean_path = try dep.clean_path(gpa);
50 const cachepath = try std.fs.path.join(gpa, &.{ cache.?, "zigmod", "deps" });50 const cachepath = try std.fs.path.join(gpa, &.{ cache, "zigmod", "deps" });
51 const modpath = try std.fs.path.join(gpa, &.{ cachepath, clean_path });51 const modpath = try std.fs.path.join(gpa, &.{ cachepath, clean_path });
52 std.log.debug("modpath: {s}", .{modpath});52 std.log.debug("modpath: {s}", .{modpath});
5353