authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-21 04:21:52 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-21 04:21:52 -07:00
log310002b87289c3f9c8a0c1178dcafcb32132ebe5
tree435ea526a7da9746a63a37f679ea25f9bfe295e2
parentcae0765ce17cc4a63166c955f6c480a3157638a0

patch fix for breaking local deps and embedded files


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

src/common.zig+2-1
...@@ -209,7 +209,7 @@ pub fn get_module_from_dep(d: *u.Dep, cachepath: []const u8, parent_name: []cons...@@ -209,7 +209,7 @@ pub fn get_module_from_dep(d: *u.Dep, cachepath: []const u8, parent_name: []cons
209 }209 }
210 }210 }
211 const modpath = try get_modpath(cachepath, d.*, parent_name, options);211 const modpath = try get_modpath(cachepath, d.*, parent_name, options);
212 const moddir = try std.fs.cwd().openDir(modpath, .{});212 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, .{});
213213
214 const nocache = d.type == .local or d.type == .system_lib;214 const nocache = d.type == .local or d.type == .system_lib;
215 if (!nocache) try options.already_fetched.append(modpath);215 if (!nocache) try options.already_fetched.append(modpath);
...@@ -269,6 +269,7 @@ pub fn get_module_from_dep(d: *u.Dep, cachepath: []const u8, parent_name: []cons...@@ -269,6 +269,7 @@ pub fn get_module_from_dep(d: *u.Dep, cachepath: []const u8, parent_name: []cons
269 if (d.only_os.len > 0) dd.only_os = d.only_os;269 if (d.only_os.len > 0) dd.only_os = d.only_os;
270 if (d.except_os.len > 0) dd.except_os = d.except_os;270 if (d.except_os.len > 0) dd.except_os = d.except_os;
271 if (d.type == .local) dd.main = try std.fs.path.join(gpa, &.{ d.main, save.main });271 if (d.type == .local) dd.main = try std.fs.path.join(gpa, &.{ d.main, save.main });
272 if (std.mem.eql(u8, modpath, "files")) dd.clean_path = modpath;
272 if (dd.is_for_this()) return dd;273 if (dd.is_for_this()) return dd;
273 return null;274 return null;
274 },275 },