authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-30 05:19:05 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-30 05:19:05 -07:00
log35fb991dff4c0b1652cd04a1a966b52672ad8aef
tree4daa295ea9b551612f60da76e92129a491dabb00
parentdec9b5404ff3e01edf1997b0febb698247e1189b

cmd/fetch- only try to delete the `.git` folder on non-windows


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

src/common.zig+1-1
...@@ -141,7 +141,7 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: *...@@ -141,7 +141,7 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: *
141 if ((try u.run_cmd(pv, &.{ "git", "checkout", vers.string })) > 0) {141 if ((try u.run_cmd(pv, &.{ "git", "checkout", vers.string })) > 0) {
142 u.assert(false, "fetch: git: {s}: {s} {s} does not exist", .{ d.path, @tagName(vers.id), vers.string });142 u.assert(false, "fetch: git: {s}: {s} {s} does not exist", .{ d.path, @tagName(vers.id), vers.string });
143 }143 }
144 if (vers.id != .branch) {144 if (std.builtin.os.tag != .windows and vers.id != .branch) {
145 const pvd = try std.fs.cwd().openDir(pv, .{});145 const pvd = try std.fs.cwd().openDir(pv, .{});
146 try pvd.deleteTree(".git");146 try pvd.deleteTree(".git");
147 }147 }