builtin_path might not be set if zig_exe_path isnt found

This commit is contained in:
Meghan Denny 2021-12-29 21:17:44 -08:00
parent 9006584835
commit 54d8f3273c

View File

@ -614,7 +614,10 @@ pub fn uriFromImportStr(self: *DocumentStore, allocator: std.mem.Allocator, hand
return try allocator.dupe(u8, builtin_uri);
}
}
if (self.builtin_path) |_| {
return try URI.fromPath(allocator, self.builtin_path.?);
}
return null;
} else if (!std.mem.endsWith(u8, import_str, ".zig")) {
if (handle.associated_build_file) |build_file| {
for (build_file.packages.items) |pkg| {