authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-20 13:07:05 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-20 13:07:05 -08:00
log08155b63267ccc528e4e9c8660aa17913d49cee1
tree6b90f33176ce7c4ff51712d6944927d7991033fa
parentf2bd0cc217c506dff006d88f0179c4c903d0365f

fetch/git: if version'd dir exists, skip download


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

src/cmd_fetch.zig+4-1
......@@ -67,7 +67,10 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {
6767 const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version});
6868 u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path});
6969 switch (d.type) {
70 .git => {
70 .git => blk: {
71 if (try u.does_file_exist(pv)) {
72 break :blk;
73 }
7174 if (!try u.does_file_exist(p)) {
7275 _ = try run_cmd(null, &[_][]const u8{"git", "clone", d.path, p});
7376 }