Skip to content

Commit 79e70ee

Browse files
committed
Fix build
1 parent c3562c3 commit 79e70ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

starter_templates/zig/build.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ pub fn build(b: *std.Build) void {
2424
// This will evaluate the `run` step rather than the default, which is "install".
2525
const run_step = b.step("run", "Run the app");
2626
run_step.dependOn(&run_cmd.step);
27+
28+
// This allows the user to pass arguments to the application in the build
29+
// command itself, like this: `zig build run -- arg1 arg2 etc`
30+
if (b.args) |args| {
31+
run_cmd.addArgs(args);
32+
}
2733
}

0 commit comments

Comments
 (0)