Merge pull request #273850 from wegank/dylib-error-fix

fixDarwinDylibNames: fix error message output
This commit is contained in:
toonn 2024-06-07 18:48:33 +02:00 committed by GitHub
commit eed45499c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,10 +23,13 @@ fixDarwinDylibNames() {
for fn in "$@"; do
if [ -L "$fn" ]; then continue; fi
echo "$fn: fixing dylib"
set +e
int_out=$(@targetPrefix@install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1)
result=$?
set -e
if [ "$result" -ne 0 ] &&
! grep "shared library stub file and can't be changed" <<< "$out"
! grep -q -e "shared library stub file and can't be changed" \
-e "is not a Mach-O file" <<< "$int_out"
then
echo "$int_out" >&2
exit "$result"