Commit 79ef96b6a4

Juha Syrjälä <juha.syrjala@iki.fi>
2020-09-29 19:56:30
Add support for `zig build run -- arg1 arg1` in file created by init-exe
1 parent 8a2d12d
Changed files (1)
lib
std
special
init-exe
lib/std/special/init-exe/build.zig
@@ -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);