From 14e46b540c6a4618333c05671a30e7daa8f79639 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 29 Nov 2024 22:20:08 +0000 Subject: [PATCH] Revert "fix: always prefer glibc to musl in mise run (#3261)" This reverts commit 3860e953cc0f4ac705cc8cfa412e53f9efb48b69. Fixes #1716 --- packaging/standalone/install.envsubst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packaging/standalone/install.envsubst b/packaging/standalone/install.envsubst index e3a8b4f29a..6c30b19948 100644 --- a/packaging/standalone/install.envsubst +++ b/packaging/standalone/install.envsubst @@ -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"