From 79ef96b6a4af3fff751d5d7ad679634643c4fc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Syrj=C3=A4l=C3=A4?= Date: Tue, 29 Sep 2020 20:56:30 +0300 Subject: [PATCH] Add support for `zig build run -- arg1 arg1` in file created by init-exe --- lib/std/special/init-exe/build.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/std/special/init-exe/build.zig b/lib/std/special/init-exe/build.zig index fd71588c5f..3a66254b02 100644 --- a/lib/std/special/init-exe/build.zig +++ b/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);