[all-commits] [llvm/llvm-project] 51e0a9: [test-release.sh] Fix sed encoding issues on macOS...
Keith Smiley via All-commits
all-commits at lists.llvm.org
Sun Sep 29 12:21:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 51e0a997ca607f64beafb838ba1325f0465eecd4
https://github.com/llvm/llvm-project/commit/51e0a997ca607f64beafb838ba1325f0465eecd4
Author: Keith Smiley <keithbsmiley at gmail.com>
Date: 2024-09-29 (Sun, 29 Sep 2024)
Changed paths:
M llvm/utils/release/test-release.sh
Log Message:
-----------
[test-release.sh] Fix sed encoding issues on macOS (#105989)
When using bsd sed that ships with macOS on the object files for
comparison, every command would error with
```
sed: RE error: illegal byte sequence
```
This was potentially fixed for an older version in
6c52b02e7d0df765da608d8119ae8a20de142cff but even the commands in the
example there still have this error. You can repro this with any binary:
```
$ sed s/a/b/ /bin/ls >/dev/null
sed: RE error: illegal byte sequence
```
Where LC_CTYPE appears to no longer solve the issue:
```
$ LC_CTYPE=C sed s/a/b/ /bin/ls >/dev/null
sed: RE error: illegal byte sequence
```
But this change with LC_ALL does:
```
$ LC_ALL=C sed s/a/b/ /bin/ls >/dev/null; echo $?
0
```
It seems like the difference here is that if you have LC_ALL set to
something else, LC_CTYPE does not override it. More info:
https://stackoverflow.com/a/23584470/902968
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list