Skip to content

Commit b6a37f6

Browse files
authored
Merge pull request #747 from lightpanda-io/fix_crash_on_error_exit
fix a silly log crash on exit error
2 parents bbdb254 + e3099a1 commit b6a37f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ pub fn main() !void {
4141
};
4242

4343
run(alloc) catch |err| {
44+
// If explicit filters were set, they won't be valid anymore because
45+
// the args_arena is gone. We need to set it to something that's not
46+
// invalid. (We should just move the args_arena up to main)
47+
log.opts.filter_scopes = &.{};
4448
log.fatal(.app, "exit", .{ .err = err });
4549
std.posix.exit(1);
4650
};

0 commit comments

Comments
 (0)