diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-03 20:37:43 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:07 -0800 |
| commit | d1d2c37af26902f953b2b72335b326c4b01e3bb2 (patch) | |
| tree | ff74335c6b9eda252c6c4970d49f36bd6f904537 /lib/std/Build/Step.zig | |
| parent | 81214278ca14b832e53876feb70fa3c072c14dd6 (diff) | |
| download | zig-d1d2c37af26902f953b2b72335b326c4b01e3bb2.tar.gz zig-d1d2c37af26902f953b2b72335b326c4b01e3bb2.zip | |
std: all Dir functions moved to std.Io
Diffstat (limited to 'lib/std/Build/Step.zig')
| -rw-r--r-- | lib/std/Build/Step.zig | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig index c247e69461..33fe755c2b 100644 --- a/lib/std/Build/Step.zig +++ b/lib/std/Build/Step.zig @@ -510,20 +510,16 @@ pub fn installFile(s: *Step, src_lazy_path: Build.LazyPath, dest_path: []const u const io = b.graph.io; const src_path = src_lazy_path.getPath3(b, s); try handleVerbose(b, null, &.{ "install", "-C", b.fmt("{f}", .{src_path}), dest_path }); - return Io.Dir.updateFile(src_path.root_dir.handle.adaptToNewApi(), io, src_path.sub_path, .cwd(), dest_path, .{}) catch |err| { - return s.fail("unable to update file from '{f}' to '{s}': {t}", .{ - src_path, dest_path, err, - }); - }; + return Io.Dir.updateFile(src_path.root_dir.handle, io, src_path.sub_path, .cwd(), dest_path, .{}) catch |err| + return s.fail("unable to update file from '{f}' to '{s}': {t}", .{ src_path, dest_path, err }); } /// Wrapper around `std.fs.Dir.makePathStatus` that handles verbose and error output. pub fn installDir(s: *Step, dest_path: []const u8) !std.fs.Dir.MakePathStatus { const b = s.owner; try handleVerbose(b, null, &.{ "install", "-d", dest_path }); - return std.fs.cwd().makePathStatus(dest_path) catch |err| { + return std.fs.cwd().makePathStatus(dest_path) catch |err| return s.fail("unable to create dir '{s}': {t}", .{ dest_path, err }); - }; } fn zigProcessUpdate(s: *Step, zp: *ZigProcess, watch: bool, web_server: ?*Build.WebServer, gpa: Allocator) !?Path { |
