authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-06 21:58:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-08 16:54:31-07:00
logaed6adb6e9f5b313c7cf6158bcd8fa5adaad7ef1
tree23134be8de5bbae4faa007789b77384085bde80a
parentf708c5fafc5087a2518e0dc7acf986b59673dddd

fix Fetch.JobQueue.consolidateErrors


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

src/Package/Fetch.zig+4-1
......@@ -93,9 +93,12 @@ pub const JobQueue = struct {
9393 /// Dumps all subsequent error bundles into the first one.
9494 pub fn consolidateErrors(jq: *JobQueue) !void {
9595 const root = &jq.all_fetches.items[0].error_bundle;
96 const gpa = root.gpa;
9697 for (jq.all_fetches.items[1..]) |fetch| {
9798 if (fetch.error_bundle.root_list.items.len > 0) {
98 try root.addBundleAsRoots(fetch.error_bundle.tmpBundle());
99 var bundle = try fetch.error_bundle.toOwnedBundle("");
100 defer bundle.deinit(gpa);
101 try root.addBundleAsRoots(bundle);
99102 }
100103 }
101104 }