# std.Build.findProgram\(\): Try with and without the Windows executable extensions\. · gitcafe/zig

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

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

Visibility: public

Requested revision: 9be9b8ca902bb7c250a6836c6090af8525464749

Requested commit: 9be9b8ca902bb7c250a6836c6090af8525464749

Commit: 9be9b8ca902bb7c250a6836c6090af8525464749

Tree: 466679045dda3c87042f50e42e763a8cddd079f8

Author: Alex Rønne Petersen

Committer: Andrew Kelley

## Message

```
std.Build.findProgram(): Try with and without the Windows executable extensions.

I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension
and made it public to avoid duplicating the list of extensions.

While here, I also improved it to not misreport OOM from std.fs.realpathAlloc()
as a generic failure to find the program, but instead panic like the rest of the
build system does for OOM.

Closes #20314.

```

## Parents

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

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