fix(fmt): return correct exit code for zig fmt --stdin --check

This commit is contained in:
Will Lillis
2025-08-10 20:21:57 -04:00
committed by Alex Rønne Petersen
parent 3280fc98f3
commit d1917b5c3a

View File

@@ -148,7 +148,7 @@ pub fn run(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
defer gpa.free(formatted);
if (check_flag) {
const code: u8 = @intFromBool(mem.eql(u8, formatted, source_code));
const code: u8 = @intFromBool(!mem.eql(u8, formatted, source_code));
process.exit(code);
}