diff --git a/src/cmd_fetch.zig b/src/cmd_fetch.zig index a006076c262766b36db665fe40298f04da373f3b..19e9e20a3fdeab2d8ce746987a03250b133c26b1 100644 --- a/src/cmd_fetch.zig +++ b/src/cmd_fetch.zig @@ -67,7 +67,10 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version}); u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path}); switch (d.type) { - .git => { + .git => blk: { + if (try u.does_file_exist(pv)) { + break :blk; + } if (!try u.does_file_exist(p)) { _ = try run_cmd(null, &[_][]const u8{"git", "clone", d.path, p}); }