aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorg-w1 <58830309+g-w1@users.noreply.github.com>2021-05-01 02:17:17 -0400
committerGitHub <noreply@github.com>2021-05-01 08:17:17 +0200
commite9e91b4ed058f4c4e3f3380ec06cb914becd04a8 (patch)
treeabcd5797ff3d27a498a35fd1f8b3e332ec9a09df /lib/std
parentfe8781357afc0fa763f6a60eb8959acd05f4dfa3 (diff)
downloadzig-e9e91b4ed058f4c4e3f3380ec06cb914becd04a8.tar.gz
zig-e9e91b4ed058f4c4e3f3380ec06cb914becd04a8.zip
std.build: if using a RunStep, show the command run on verbose (#8571)
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/build/run.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/std/build/run.zig b/lib/std/build/run.zig
index ca39b0216e..1e16813cb8 100644
--- a/lib/std/build/run.zig
+++ b/lib/std/build/run.zig
@@ -191,6 +191,13 @@ pub const RunStep = struct {
child.stdout_behavior = stdIoActionToBehavior(self.stdout_action);
child.stderr_behavior = stdIoActionToBehavior(self.stderr_action);
+ if (self.builder.verbose) {
+ for (argv) |arg| {
+ warn("{s} ", .{arg});
+ }
+ warn("\n", .{});
+ }
+
child.spawn() catch |err| {
warn("Unable to spawn {s}: {s}\n", .{ argv[0], @errorName(err) });
return err;