Add support for zig build run -- arg1 arg1 in file created by init-exe

This commit is contained in:
Juha Syrjälä 2020-09-29 20:56:30 +03:00 committed by Andrew Kelley
parent 8a2d12d707
commit 79ef96b6a4

View File

@ -18,6 +18,9 @@ pub fn build(b: *Builder) void {
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);