authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-06 02:10:03 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-06 02:10:03 -07:00
log80b84cca7fb994b8798f3411ed40252e8b5310b3
tree4cfb23f8fa72d52bd0e46b64af570cac78007e60
parent790d3b997c342e1827b041b330f8f3d41613ead6

util/dep: include url in http dep path


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

src/util/dep.zig+2-1
...@@ -37,7 +37,8 @@ pub const Dep = struct {...@@ -37,7 +37,8 @@ pub const Dep = struct {
3737
38 pub fn clean_path_v(self: Dep) ![]const u8 {38 pub fn clean_path_v(self: Dep) ![]const u8 {
39 if (self.type == .http and self.version.len > 0) {39 if (self.type == .http and self.version.len > 0) {
40 return std.mem.join(gpa, "/", &.{ "v", @tagName(self.type), self.version[0..20] });40 const i = std.mem.indexOf(u8, self.version, "-").?;
41 return std.mem.join(gpa, "/", &.{ "v", try self.clean_path(), self.version[i + 1 .. 15] });
41 }42 }
42 return std.mem.join(gpa, "/", &.{ "v", try self.clean_path(), self.version });43 return std.mem.join(gpa, "/", &.{ "v", try self.clean_path(), self.version });
43 }44 }