From 54d8f3273c0b59a7bcc8fc48f60d55289454a0be Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 29 Dec 2021 21:17:44 -0800 Subject: [PATCH] builtin_path might not be set if zig_exe_path isnt found --- src/DocumentStore.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index fa6da16..d036ee8 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -614,7 +614,10 @@ pub fn uriFromImportStr(self: *DocumentStore, allocator: std.mem.Allocator, hand return try allocator.dupe(u8, builtin_uri); } } - return try URI.fromPath(allocator, self.builtin_path.?); + 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| {