Skip to content

Commit bf42676

Browse files
committed
Simplify zig test path
1 parent b55d750 commit bf42676

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

build.zig

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,9 @@ pub fn build(b: *std.Build) !void {
241241
const version_file_path = "include/sodium/version.h";
242242

243243
if (is_zig_16) {
244-
src_dir.access(io, version_file_path, .{}) catch {
245-
try Dir.copyFile(cwd, prebuilt_version_file_path, src_dir, version_file_path, io, .{});
246-
};
247-
} else if (@hasField(Dir.OpenOptions, "follow_symlinks")) {
248-
src_dir.access(version_file_path, .{ .read = true }) catch {
249-
try cwd.copyFile(prebuilt_version_file_path, src_dir, version_file_path, .{});
250-
};
244+
try Dir.copyFile(cwd, prebuilt_version_file_path, src_dir, version_file_path, io, .{});
251245
} else {
252-
src_dir.access(version_file_path, .{ .mode = .read_only }) catch {
253-
try cwd.copyFile(prebuilt_version_file_path, src_dir, version_file_path, .{});
254-
};
246+
try cwd.copyFile(prebuilt_version_file_path, src_dir, version_file_path, .{});
255247
}
256248

257249
for (libs.items) |lib| {

0 commit comments

Comments
 (0)