Commit 83e3846
bazel-hermetic: drop realpath from shebang check; macOS-safe LANG
Two macOS findings from the latest Gemini pass:
- Shebang detection no longer shells out to realpath (nor readlink -f):
read the candidate via redirection, `head -c 2 < "${BAZEL}"`. open()
follows the symlink itself, so no path-resolution tool is needed —
which also settles whether realpath/readlink -f is present on macOS
(it need not be). Verified reading through a symlink yields the target
file's first bytes.
- LANG: macOS has no C.UTF-8 locale, so forcing it makes programs emit
"cannot change locale" warnings. Pick en_US.UTF-8 on Darwin, C.UTF-8
elsewhere; both give UTF-8 byte handling.
Re-verified with the stub-bazel argv harness (build / bug case / info).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>1 parent ad51f2a commit 83e3846
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
199 | 209 | | |
200 | 210 | | |
201 | 211 | | |
202 | 212 | | |
203 | 213 | | |
204 | 214 | | |
205 | | - | |
| 215 | + | |
206 | 216 | | |
207 | 217 | | |
208 | 218 | | |
0 commit comments