| author | |
| committer | |
| log | a53fd2f725c29ab5e5de65d300dee48d22bfe023 |
| tree | ace9c582d066f823d88212e4873d79435fbd4db5 |
| parent | 73af129674c57d49efa4a19eec523bd36079bcec |
2 files changed, 7 insertions(+), 1 deletions(-)
src/cmd_fetch.zig+1-1| ... | ... | @@ -91,7 +91,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { |
| 91 | 91 | } |
| 92 | 92 | _ = try run_cmd(null, &[_][]const u8{"git", "clone", d.path, pv}); |
| 93 | 93 | _ = try run_cmd(pv, &[_][]const u8{"git", "checkout", ref}); |
| 94 | const pvd = try std.fs.openDirAbsolute(pv, .{}); | |
| 94 | const pvd = try u.open_dir_absolute(pv); | |
| 95 | 95 | try pvd.deleteTree(".git"); |
| 96 | 96 | moddir = pv; |
| 97 | 97 | } |
src/util/funcs.zig+6| ... | ... | @@ -115,3 +115,9 @@ pub fn list_contains(haystack: *std.ArrayList([]const u8), needle: []const u8) b |
| 115 | 115 | } |
| 116 | 116 | return false; |
| 117 | 117 | } |
| 118 | ||
| 119 | pub fn open_dir_absolute(dpath: []const u8) !std.fs.Dir { | |
| 120 | return std.fs.Dir{ | |
| 121 | .fd = (try std.fs.openFileAbsolute(dpath, .{})).handle, | |
| 122 | }; | |
| 123 | } |