mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
fix(fmt): return correct exit code for zig fmt --stdin --check
This commit is contained in:
parent
3280fc98f3
commit
d1917b5c3a
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ pub fn run(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
|
||||||
defer gpa.free(formatted);
|
defer gpa.free(formatted);
|
||||||
|
|
||||||
if (check_flag) {
|
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);
|
process.exit(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue