fix(fmt): return correct exit code for zig fmt --stdin --check
This commit is contained in:
committed by
Alex Rønne Petersen
parent
3280fc98f3
commit
d1917b5c3a
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user