| ... | ... | @@ -243,8 +243,8 @@ pub fn get_module_from_dep(d: *zigmod.Dep, cachepath: string, options: *CollectO |
| 243 | 243 | return null; |
| 244 | 244 | } |
| 245 | 245 | const moddirO = try std.fs.cwd().openDir(modpath, .{}); |
| 246 | | const tryname = try u.detect_pkgname(options.alloc, "", modpath); |
| 247 | | const trymain = u.detct_mainfile(options.alloc, "", moddirO, tryname) catch |err| switch (err) { |
| 246 | const tryname = try u.detect_pkgname(options.alloc, d.name, modpath); |
| 247 | const trymain = u.detct_mainfile(options.alloc, d.main, moddirO, tryname) catch |err| switch (err) { |
| 248 | 248 | error.CantFindMain => null, |
| 249 | 249 | else => return err, |
| 250 | 250 | }; |