From 2c136a36080a98a45b05d57d3adb6a21cad89536 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:32:04 -0600 Subject: [PATCH] Revert "fix: always prefer glibc to musl in mise run (#3261)" (#3298) 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 e3a8b4f29..6c30b1994 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"