Skip to content

Commit

Permalink
fix installation on where AVX2 isn't supported
Browse files Browse the repository at this point in the history
Fixes #21
  • Loading branch information
cometkim committed Apr 16, 2024
1 parent e503786 commit 8491f02
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ function get_bin_url() {
local platform=$2
local arch=$3

local url="$REPO_URL/releases/download/bun-v$version/bun-$platform-$arch.zip"
local target="$platform-$arch"
if [[ "$target" = "linux-x64" ]]; then
# See https://github.com/cometkim/asdf-bun/issues/21
if [[ "$(grep "avx2" < /proc/cpuinfo)" = "" ]]; then
target="linux-x64-baseline"
fi
fi

local url="$REPO_URL/releases/download/bun-v$version/bun-$target.zip"

echo -n "$url"
}
Expand Down

0 comments on commit 8491f02

Please sign in to comment.