Repository navigation
Commit 5c32e2c
fix(scripts): make check-authors work on macOS bash 3.2
The script aborted immediately on macOS with "declare: -A: invalid
option". It relied on four constructs unavailable there: associative
arrays and readarray (bash 4.0+), the -v array-key test (bash 4.2+),
and grep -oP with \K (GNU grep; /usr/bin/grep rejects -P).
Replaces them with an indexed array plus the script's existing
array_contains helper, while-read loops, and a POSIX sed expression.
Empty-array expansions now use the ${arr[@]+...} idiom already used
elsewhere, since bash 3.2 under `set -u` errors on "${empty[@]}".
The known-authors scan also excludes */target/* so it matches the
file-discovery filter and is unaffected by whether a build has run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Marc Nuri <marc@marcnuri.com>1 parent 136cae4 commit 5c32e2c
1 file changed
Lines changed: 22 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
124 | 131 | | |
125 | 132 | | |
126 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
130 | | - | |
131 | | - | |
| 142 | + | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
| |||
0 commit comments