From 15d9beec072616c76c1fddd701020790f81e5546 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 7 Jan 2026 21:02:52 +0000 Subject: [PATCH] open dir relative to build root when building examples --- build.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.zig b/build.zig index bd61fce..df695fb 100644 --- a/build.zig +++ b/build.zig @@ -182,7 +182,7 @@ fn buildExamples(b: *Build, options: BuildExamplesOptions) !void { const build_all_step = b.step("examples", "build all examples"); const examples_path = lazy_path.getPath(b); - var examples_dir = std.fs.openDirAbsolute(examples_path, .{ .iterate = true }) catch |err| { + var examples_dir = b.build_root.handle.openDir(examples_path, .{ .iterate = true }) catch |err| { switch (err) { error.FileNotFound => return, else => return err, @@ -233,4 +233,3 @@ fn buildExample( const exe_run_step = b.step(step_name, step_desc); exe_run_step.dependOn(&exe_run.step); } -