authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-21 01:08:52 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-21 01:08:52 -07:00
logd728c68f7d749d7a64c1d426fd7bbb4b79a4a63b
tree7477f0cedcb57d7e3262c626447d782050febe0b
parentbf4cc92d981de56b75bf6005cc66dea32d9d7eba

only make `.zigmod/deps/files` folder if package has files


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

src/common.zig+2-1
......@@ -32,8 +32,8 @@ pub fn collect_deps_deep(cachepath: []const u8, mpath: []const u8, options: *Col
3232 try options.init();
3333 var moduledeps = std.ArrayList(u.Module).init(gpa);
3434 defer moduledeps.deinit();
35 try std.fs.cwd().makePath(".zigmod/deps/files");
3635 if (m.root_files.len > 0) {
36 try std.fs.cwd().makePath(".zigmod/deps/files");
3737 try moduledeps.append(try add_files_package("root", m.root_files, m.name));
3838 }
3939 try moduledeps.append(try collect_deps(cachepath, mpath, options));
......@@ -59,6 +59,7 @@ pub fn collect_deps(cachepath: []const u8, mpath: []const u8, options: *CollectO
5959 var moduledeps = std.ArrayList(u.Module).init(gpa);
6060 defer moduledeps.deinit();
6161 if (m.files.len > 0) {
62 try std.fs.cwd().makePath(".zigmod/deps/files");
6263 try moduledeps.append(try add_files_package(m.id, m.files, m.name));
6364 }
6465 for (m.deps) |*d| {