mirror of
https://github.com/ziglang/zig.git
synced 2026-02-04 21:53:38 +00:00
fix zig fmt crash
This commit is contained in:
parent
a7754d219a
commit
b5baa41077
@ -5120,8 +5120,8 @@ fn fmtPathFile(
|
||||
var tree = try Ast.parse(gpa, source_code, .zig);
|
||||
defer tree.deinit(gpa);
|
||||
|
||||
try printAstErrorsToStderr(gpa, tree, file_path, fmt.color);
|
||||
if (tree.errors.len != 0) {
|
||||
try printAstErrorsToStderr(gpa, tree, file_path, fmt.color);
|
||||
fmt.any_error = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user