# fix regression in \`zig run\` runtime arguments · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c3a2b51a2cdd5a64401df2ad326c20f151455f00)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c3a2b51a2cdd5a64401df2ad326c20f151455f00

Requested commit: c3a2b51a2cdd5a64401df2ad326c20f151455f00

Commit: c3a2b51a2cdd5a64401df2ad326c20f151455f00

Tree: 35e62307e7e000c8a18a2d42ab90c58e84b3c3c0

Author: Stephen Gutekanst

Committer: Stephen Gutekanst

## Message

```
fix regression in `zig run` runtime arguments

This brings back #10950, which was reverted in 5ab5e2e6731a9f1198df6c53134545ccc6a6bbd3
because it [introduced a regression in `zig run`](https://github.com/ziglang/zig/pull/10950#issuecomment-1049481212)
where the runtime arguments passed were incorrect.

I've fixed the issue, and notably this was the only location where we
directly relied on accessing arguments by index in this code still (all
other locations use the iterator proper) and so we should be all good to
go now.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>

```

## Parents

- [cfb4f48941b194151fa1b6a4958b161dba139996](https://git.cafe/gitcafe/zig/commit/cfb4f48941b194151fa1b6a4958b161dba139996?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c3a2b51a2cdd5a64401df2ad326c20f151455f00?format=markdown)
