aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/CheckFile.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/Build/Step/CheckFile.zig')
-rw-r--r--lib/std/Build/Step/CheckFile.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/std/Build/Step/CheckFile.zig b/lib/std/Build/Step/CheckFile.zig
index efeedc8b80..1c3813ca82 100644
--- a/lib/std/Build/Step/CheckFile.zig
+++ b/lib/std/Build/Step/CheckFile.zig
@@ -3,7 +3,9 @@
//! TODO: generalize the code in std.testing.expectEqualStrings and make this
//! CheckFile step produce those helpful diagnostics when there is not a match.
const CheckFile = @This();
+
const std = @import("std");
+const Io = std.Io;
const Step = std.Build.Step;
const fs = std.fs;
const mem = std.mem;
@@ -49,11 +51,12 @@ pub fn setName(check_file: *CheckFile, name: []const u8) void {
fn make(step: *Step, options: Step.MakeOptions) !void {
_ = options;
const b = step.owner;
+ const io = b.graph.io;
const check_file: *CheckFile = @fieldParentPtr("step", step);
try step.singleUnchangingWatchInput(check_file.source);
const src_path = check_file.source.getPath2(b, step);
- const contents = fs.cwd().readFileAlloc(src_path, b.allocator, .limited(check_file.max_bytes)) catch |err| {
+ const contents = Io.Dir.cwd().readFileAlloc(io, src_path, b.allocator, .limited(check_file.max_bytes)) catch |err| {
return step.fail("unable to read '{s}': {s}", .{
src_path, @errorName(err),
});