authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2021-01-08 16:12:47 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2021-01-08 16:12:47 -08:00
log8cae4678e687cfb5c97f841a77cbc1131b787bc7
treea8043f5ae54703ad3fb9947f51770e635c23ef31
parent9ab0a931b0d78257b262fac27bda81ca0e1fd0e2

dep files use relative paths now


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

src/cmd_fetch.zig+1-1
...@@ -126,7 +126,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {...@@ -126,7 +126,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {
126 try d.type.pull(d.path, pv);126 try d.type.pull(d.path, pv);
127 _ = try u.run_cmd(pv, &[_][]const u8{"git", "checkout", vers.string});127 _ = try u.run_cmd(pv, &[_][]const u8{"git", "checkout", vers.string});
128 if (vers.id != .branch) {128 if (vers.id != .branch) {
129 const pvd = try u.open_dir_absolute(pv);129 const pvd = try std.fs.cwd().openDir(pv, .{});
130 try pvd.deleteTree(".git");130 try pvd.deleteTree(".git");
131 }131 }
132 moddir = pv;132 moddir = pv;
src/util/funcs.zig-6
...@@ -133,12 +133,6 @@ pub fn list_contains(haystack: [][]const u8, needle: []const u8) bool {...@@ -133,12 +133,6 @@ pub fn list_contains(haystack: [][]const u8, needle: []const u8) bool {
133 return false;133 return false;
134}134}
135135
136pub fn open_dir_absolute(dpath: []const u8) !std.fs.Dir {
137 return std.fs.Dir{
138 .fd = (try std.fs.cwd().openFile(dpath, .{})).handle,
139 };
140}
141
142pub fn list_contains_gen(comptime T: type, haystack: *std.ArrayList(T), needle: T) bool {136pub fn list_contains_gen(comptime T: type, haystack: *std.ArrayList(T), needle: T) bool {
143 for (haystack.items) |item| {137 for (haystack.items) |item| {
144 if (item.eql(needle)) {138 if (item.eql(needle)) {