Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
komi1230 committed Jul 17, 2024
1 parent 3366305 commit cde4a38
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ fail() {
curl_opts=(-fsSL)

# NOTE: You might want to remove this if atlas is not hosted on GitHub releases.
if [ -n "${GITHUB_API_TOKEN:-}" ];
then
if [ -n "${GITHUB_API_TOKEN:-}" ]; then
curl_opts=("${curl_opts[@]}" -H "Authorization: token $GITHUB_API_TOKEN")
fi

Expand All @@ -34,7 +33,7 @@ list_github_tags() {
list_all_versions() {
list_github_tags |
grep -e '^v' |
sed -e 's/^v//'
sed -e 's/^v//'
}

download_release() {
Expand Down Expand Up @@ -64,7 +63,7 @@ install_version() {
(
mkdir -p "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"
chmod +x "$install_path/atlas"
chmod +x "$install_path/atlas"

local tool_cmd
tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)"
Expand Down Expand Up @@ -111,8 +110,9 @@ get_architecture() {
# or the glibc version is <2.31, use the musl build.
if [ "$_version" != "latest" ] &&
[ "$(printf '%s\n' "v0.12.1" "$_version" | sort -V | head -n1)" = "$_version" ]; then
_tmp_version="$(ldd --version | awk '/ldd/{print $NF}')"
if ldd --version 2>&1 | grep -q 'musl' ||
[ "$(version \"$(ldd --version | awk '/ldd/{print $NF}')\")" -lt "$(version '2.31')" ]; then
[ "$(version \"$_tmp_version\")" -lt "$(version '2.31')" ]; then
_cputype="$_cputype-musl"
fi
fi
Expand Down

0 comments on commit cde4a38

Please sign in to comment.