Explorar o código

zig: run examples from their directories (#4063)

So that they can find their respective resource folders.
Mike Will hai 1 ano
pai
achega
81ff879b04
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      examples/build.zig

+ 1 - 0
examples/build.zig

@@ -75,6 +75,7 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.Reso
         const install_cmd = b.addInstallArtifact(exe, .{});
 
         const run_cmd = b.addRunArtifact(exe);
+        run_cmd.cwd = b.path(module);
         run_cmd.step.dependOn(&install_cmd.step);
 
         const run_step = b.step(name, name);