diff --git a/src/common.zig b/src/common.zig index aebb4f1f10cff1b215f61caff50e762a4466c356..2b4b600acbec40a97dfad6113c4fc68f8c614ff8 100644 --- a/src/common.zig +++ b/src/common.zig @@ -210,6 +210,7 @@ pub fn get_module_from_dep(d: *zigmod.Dep, cachepath: string, options: *CollectO } } } + if (!d.is_for_this()) return null; const modpath = try get_modpath(cachepath, d.*, options); const moddir = if (std.mem.eql(u8, modpath, "files") or modpath.len == 0) try std.fs.cwd().openDir(cachepath, .{}) else try std.fs.cwd().openDir(modpath, .{});