authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-12-29 12:32:13 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-12-29 12:32:13 -08:00
log85223242a3720198a235b4416d47696a489b9c93
treeed5ce561ad696ebe495bceefb2dc3ca40950e0f8
parent6a2424e83d974bd354b00c4e3c5d6a4edc8166b0

fetch: now works on windows


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

src/util/dep.zig+3-3
...@@ -29,15 +29,15 @@ pub const Dep = struct {...@@ -29,15 +29,15 @@ pub const Dep = struct {
29 p = u.trim_prefix(p, "https://");29 p = u.trim_prefix(p, "https://");
30 p = u.trim_prefix(p, "git://");30 p = u.trim_prefix(p, "git://");
31 p = u.trim_suffix(u8, p, ".git");31 p = u.trim_suffix(u8, p, ".git");
32 p = try std.fs.path.join(gpa, &[_][]const u8{@tagName(self.type), p});32 p = try std.mem.join(gpa, "/", &[_][]const u8{@tagName(self.type), p});
33 return p;33 return p;
34 }34 }
3535
36 pub fn clean_path_v(self: Dep) ![]const u8 {36 pub fn clean_path_v(self: Dep) ![]const u8 {
37 if (self.type == .http and self.version.len > 0) {37 if (self.type == .http and self.version.len > 0) {
38 return std.fs.path.join(gpa, &[_][]const u8{"v", @tagName(self.type), self.version});38 return std.mem.join(gpa, "/", &[_][]const u8{"v", @tagName(self.type), self.version});
39 }39 }
40 return std.fs.path.join(gpa, &[_][]const u8{"v", try self.clean_path(), self.version});40 return std.mem.join(gpa, "/", &[_][]const u8{"v", try self.clean_path(), self.version});
41 }41 }
4242
43 pub fn is_for_this(self: Dep) bool {43 pub fn is_for_this(self: Dep) bool {