Commit ad332f9
committed
feat(audit): accept bin/foo.exe as a match for
On windows/* targets, make install produces `bin/foo.exe` instead
of `bin/foo`. Recipes that target multiple platforms shouldn't have
to enumerate both forms in `provides:` — extend the lookup to also
accept the `.exe` suffix as a fallback.
This is the brewkit hook @jhheider pointed at on #346
(audit/audit.ts line 46). It unblocks the jq Windows pilot
(pkgxdev/pantry#12987) which would otherwise fail the `provides:
- bin/jq` audit on its windows/x86-64 target (the actual binary is
`bin/jq.exe`).
Implementation: just expand the search list. Cost is one extra stat
per provided binary on non-Windows installs (no measurable impact);
zero false-positive risk because `.exe` files are unconventional on
POSIX systems.
No platform check at audit time — the audit runs over whatever's
in the cellar, doesn't need to know what target was built for. If
`foo.exe` exists, that's a real PE binary and counts as providing
`foo`.provides: - bin/foo
1 parent a4f0663 commit ad332f9
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| |||
0 commit comments