Skip to content

Commit

Permalink
fix: libmusl support fix #34
Browse files Browse the repository at this point in the history
Signed-off-by: Joke de Buhr <joke@xckk.de>
  • Loading branch information
joke committed Jun 4, 2023
1 parent 351998f commit 8824ddc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/download
Expand Up @@ -10,7 +10,7 @@ source "${plugin_dir}/lib/utils.bash"

mkdir -p "$ASDF_DOWNLOAD_PATH"

platform="$(detect_system)_$(detect_architecture)"
platform="$(detect_system)_$(detect_architecture)$(detect_variant)"
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz"

# Download tar.gz file to the download directory
Expand Down
7 changes: 7 additions & 0 deletions lib/utils.bash
Expand Up @@ -50,6 +50,13 @@ detect_architecture() {
esac
}

detect_variant() {
case "$(ldd /bin/sh)" in
*musl*) echo '-musl';;
*) echo '';
esac
}

download_release() {
local version platform filename url
version="$1"
Expand Down

0 comments on commit 8824ddc

Please sign in to comment.