Commit 4af75ec
committed
fix: derive LINUX_PKG_PATTERN from LIBC_BY_SUFFIX keys (#1172)
Greptile flagged that the unknown-suffix error message told developers to
extend LIBC_BY_SUFFIX, but the regex (gnu|musl) capture group is the actual
gatekeeper — adding only a map entry would leave the package permanently
unmatched. Derive LINUX_PKG_PATTERN from Object.keys(LIBC_BY_SUFFIX) so the
regex and map can never drift apart, and update the error to reflect that
adding a map entry is now genuinely the only required change.
Also switch the script path interpolation to use fileURLToPath(import.meta.url)
instead of string-replacing the file:// scheme, per Claude's review note.1 parent e3701bb commit 4af75ec
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
30 | | - | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| |||
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
74 | | - | |
75 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
| |||
0 commit comments