| author | |
| committer | |
| log | 5aefcbf273f410c87a3d44104f5f3cf038d637eb |
| tree | 652f8da2098292e675693e4283cabd641ff00756 |
| parent | f4631581425f63772dacf1b1e99da8ca3c4375c5 |
4 files changed, 7 insertions(+), 7 deletions(-)
src/cmd_add.zig+2-2| ... | @@ -17,7 +17,7 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -17,7 +17,7 @@ pub fn execute(args: [][]u8) !void { |
| 17 | const dep_type = std.meta.stringToEnum(u.DepType, dept); | 17 | const dep_type = std.meta.stringToEnum(u.DepType, dept); |
| 18 | u.assert(dep_type != null, "provided <type> parameter \"{}\" is not a valid dependency type", .{dept}); | 18 | u.assert(dep_type != null, "provided <type> parameter \"{}\" is not a valid dependency type", .{dept}); |
| 19 | 19 | ||
| 20 | const m = try u.ModFile.init(gpa, "./zig.mod"); | 20 | const m = try u.ModFile.init(gpa, "zig.mod"); |
| 21 | for (m.deps) |d| { | 21 | for (m.deps) |d| { |
| 22 | u.assert(!(d.type == dep_type.? and std.mem.eql(u8, d.path, path)), "dependency already added, skipping!", .{}); | 22 | u.assert(!(d.type == dep_type.? and std.mem.eql(u8, d.path, path)), "dependency already added, skipping!", .{}); |
| 23 | } | 23 | } |
| ... | @@ -38,7 +38,7 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -38,7 +38,7 @@ pub fn execute(args: [][]u8) !void { |
| 38 | }); | 38 | }); |
| 39 | 39 | ||
| 40 | // | 40 | // |
| 41 | const f = try std.fs.cwd().createFile("./zig.mod", .{}); | 41 | const f = try std.fs.cwd().createFile("zig.mod", .{}); |
| 42 | defer f.close(); | 42 | defer f.close(); |
| 43 | 43 | ||
| 44 | const w = f.writer(); | 44 | const w = f.writer(); |
src/cmd_fetch.zig+2-2| ... | @@ -13,10 +13,10 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -13,10 +13,10 @@ pub fn execute(args: [][]u8) !void { |
| 13 | const home = try known_folders.getPath(gpa, .home); | 13 | const home = try known_folders.getPath(gpa, .home); |
| 14 | const dir = try fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"}); | 14 | const dir = try fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"}); |
| 15 | 15 | ||
| 16 | const top_module = try fetch_deps(dir, "./zig.mod"); | 16 | const top_module = try fetch_deps(dir, "zig.mod"); |
| 17 | 17 | ||
| 18 | // | 18 | // |
| 19 | const f = try fs.cwd().createFile("./deps.zig", .{}); | 19 | const f = try fs.cwd().createFile("deps.zig", .{}); |
| 20 | defer f.close(); | 20 | defer f.close(); |
| 21 | 21 | ||
| 22 | const w = f.writer(); | 22 | const w = f.writer(); |
src/cmd_init.zig+1-1| ... | @@ -10,7 +10,7 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -10,7 +10,7 @@ pub fn execute(args: [][]u8) !void { |
| 10 | const name = try detect_pkgname(u.try_index([]const u8, args, 0, "")); | 10 | const name = try detect_pkgname(u.try_index([]const u8, args, 0, "")); |
| 11 | const mainf = try detct_mainfile(u.try_index([]const u8, args, 1, "")); | 11 | const mainf = try detct_mainfile(u.try_index([]const u8, args, 1, "")); |
| 12 | 12 | ||
| 13 | const file = try std.fs.cwd().createFile("./zig.mod", .{}); | 13 | const file = try std.fs.cwd().createFile("zig.mod", .{}); |
| 14 | defer file.close(); | 14 | defer file.close(); |
| 15 | 15 | ||
| 16 | const fwriter = file.writer(); | 16 | const fwriter = file.writer(); |
src/cmd_sum.zig+2-2| ... | @@ -12,10 +12,10 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -12,10 +12,10 @@ pub fn execute(args: [][]u8) !void { |
| 12 | // | 12 | // |
| 13 | const home = try known_folders.getPath(gpa, .home); | 13 | const home = try known_folders.getPath(gpa, .home); |
| 14 | const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"}); | 14 | const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"}); |
| 15 | const top_module = try common.collect_deps(dir, "./zig.mod"); | 15 | const top_module = try common.collect_deps(dir, "zig.mod"); |
| 16 | 16 | ||
| 17 | // | 17 | // |
| 18 | const f = try std.fs.cwd().createFile("./zig.sum", .{}); | 18 | const f = try std.fs.cwd().createFile("zig.sum", .{}); |
| 19 | defer f.close(); | 19 | defer f.close(); |
| 20 | const w = f.writer(); | 20 | const w = f.writer(); |
| 21 | 21 |