| ... | @@ -12,7 +12,10 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -12,7 +12,10 @@ pub fn execute(args: [][]u8) !void { |
| 12 | | 12 | |
| 13 | const cachepath = try std.fs.path.join(gpa, &.{ ".zigmod", "deps" }); | 13 | const cachepath = try std.fs.path.join(gpa, &.{ ".zigmod", "deps" }); |
| 14 | const dir = std.fs.cwd(); | 14 | const dir = std.fs.cwd(); |
| | 15 | try do(cachepath, dir); |
| | 16 | } |
| 15 | | 17 | |
| | 18 | pub fn do(cachepath: []const u8, dir: std.fs.Dir) !void { |
| 16 | var options = common.CollectOptions{ | 19 | var options = common.CollectOptions{ |
| 17 | .log = true, | 20 | .log = true, |
| 18 | .update = false, | 21 | .update = false, |
| ... | @@ -23,5 +26,6 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -23,5 +26,6 @@ pub fn execute(args: [][]u8) !void { |
| 23 | var list = std.ArrayList(u.Module).init(gpa); | 26 | var list = std.ArrayList(u.Module).init(gpa); |
| 24 | try common.collect_pkgs(top_module, &list); | 27 | try common.collect_pkgs(top_module, &list); |
| 25 | | 28 | |
| 26 | try @import("./fetch.zig").create_depszig(cachepath, top_module, &list); | 29 | const fetch = @import("./fetch.zig"); |
| | 30 | try fetch.create_depszig(cachepath, dir, top_module, &list); |
| 27 | } | 31 | } |