File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -329,13 +329,10 @@ else
329329
330330pub fn minimumZigVersion (b : * Build ) ! ? []const u8 {
331331 const zon_path = try std .fs .path .join (b .allocator , &.{ b .build_root .path .? , "build.zig.zon" });
332- const zon_file = std .fs .cwd ().readFileAllocOptions (
333- b .allocator ,
332+ const zon_file = @import ("zonparse.zig" ).cwdReadFileAllocZ (
334333 zon_path ,
334+ b .allocator ,
335335 std .math .maxInt (u32 ),
336- null ,
337- align_one ,
338- 0 ,
339336 ) catch | err | switch (err ) {
340337 error .FileNotFound = > return null ,
341338 else = > return err ,
Original file line number Diff line number Diff line change @@ -42,20 +42,20 @@ pub fn cwdReadFileAllocZ(
4242 max_bytes : usize ,
4343) ! [:0 ]const u8 {
4444 const cwd = std .fs .cwd ();
45- if (comptime later_than_zig_15 ) {
45+ if (comptime later_than_zig_14 ) {
4646 return cwd .readFileAllocOptions (
47- subpath ,
4847 allocator ,
49- std .Io .Limit .limited (max_bytes ),
48+ subpath ,
49+ max_bytes ,
50+ null ,
5051 align_one ,
5152 0 ,
5253 );
5354 } else {
5455 return cwd .readFileAllocOptions (
55- allocator ,
5656 subpath ,
57- max_bytes ,
58- null ,
57+ allocator ,
58+ std . Io . Limit . limited ( max_bytes ) ,
5959 align_one ,
6060 0 ,
6161 );
You can’t perform that action at this time.
0 commit comments