# std.Build.Step.Run: prefix relative path arguments with '\./' · gitcafe/zig

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

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

Visibility: public

Requested revision: 36499c251c592d10a8258b1562bee22e5fb7899a

Requested commit: 36499c251c592d10a8258b1562bee22e5fb7899a

Commit: 36499c251c592d10a8258b1562bee22e5fb7899a

Tree: fa03fda7f222e30607b62a6e2c25d193f6e96c43

Author: mlugg

Committer: Matthew Lugg

## Message

```
std.Build.Step.Run: prefix relative path arguments with './'

This is necessary in two cases:

* On POSIX, the exe path (`argv[0]`) must contain a path separator
* Some programs might treat a file named e.g. `-foo` as a flag, which
  can be avoided by passing `./-foo`

Rather than detecting these two cases, just always include the prefix;
there's no harm in it.

Also, if the cwd is specified, include it in the manifest. If the user
has set the cwd of a Run step, it is clearly because this affects the
behavior of the executable somehow, so that cwd path should be a part of
the step's manifest.

Resolves: #24216

```

## Parents

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

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