From e3099a16d47e191a6447411bd9e0ee18a27ec32a Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Mon, 2 Jun 2025 23:34:09 +0800 Subject: [PATCH] fix a silly log crash on exit error --- src/main.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.zig b/src/main.zig index 753e84fa..55db86bb 100644 --- a/src/main.zig +++ b/src/main.zig @@ -41,6 +41,10 @@ pub fn main() !void { }; run(alloc) catch |err| { + // If explicit filters were set, they won't be valid anymore because + // the args_arena is gone. We need to set it to something that's not + // invalid. (We should just move the args_arena up to main) + log.opts.filter_scopes = &.{}; log.fatal(.app, "exit", .{ .err = err }); std.posix.exit(1); };