Skip to content

Commit

Permalink
Fix string return
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Hemi authored and Simon Hemi committed Mar 7, 2024
1 parent 8c99ecc commit d7fcfc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source "${plugin_dir}/lib/utils.bash"

mkdir -p "$ASDF_DOWNLOAD_PATH"

ext= get_ext
ext=get_ext

# TODO: Adapt this to proper extension and adapt extracting strategy.
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.${ext}"
Expand Down
20 changes: 10 additions & 10 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ list_all_versions() {
get_os() {
case "$OSTYPE" in
darwin*)
return "apple-darwin" ;;
echo "apple-darwin" ;;
linux*)
return "unknow-linux-gnu" ;;
echo "unknow-linux-gnu" ;;
msys*)
return "pc-windows-msvc" ;;
echo "pc-windows-msvc" ;;
cygwin*)
return "pc-windows-msvc" ;;
echo "pc-windows-msvc" ;;
*)
echo "OS type is not supported"
exit 1 ;;
Expand All @@ -53,13 +53,13 @@ get_os() {
get_ext() {
case "$OSTYPE" in
darwin*)
return "tar.gz" ;;
echo "tar.gz" ;;
linux*)
return "tar.gz" ;;
echo "tar.gz" ;;
msys*)
return "zip" ;;
echo "zip" ;;
cygwin*)
return "zip" ;;
echo "zip" ;;
*)
echo "OS type is not supported"
exit 1 ;;
Expand All @@ -72,8 +72,8 @@ download_release() {
filename="$2"

architecture="$(arch)"
os= get_os
ext= get_ext
os=get_os
ext=get_ext

url="$GH_REPO/releases//download/v${version}/$TOOL_NAME-v${version}-${architecture}-${os}.${ext}"

Expand Down

0 comments on commit d7fcfc5

Please sign in to comment.