Revert "fix: always prefer glibc to musl in mise run (#3261)" (#3298)

This reverts commit 3860e953cc.

Fixes #1716
This commit is contained in:
jdx 2024-11-29 16:32:04 -06:00 committed by GitHub
parent f8fc242e1c
commit 2c136a3608
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -42,11 +42,12 @@ get_os() {
get_arch() {
musl=""
if [ "${MISE_GLIBC-}" = "1" ]; then
musl=""
elif [ "$(get_os)" = "linux" ]; then
musl="-musl"
fi
if type ldd >/dev/null 2>/dev/null; then
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
if [ -n "$libc" ]; then
musl="-musl"
fi
fi
arch="$(uname -m)"
if [ "$arch" = x86_64 ]; then
echo "x64$musl"