Skip to content

Commit

Permalink
Fix listing releases error on Windows (#37)
Browse files Browse the repository at this point in the history
Fix listing releases error on Windows.
  • Loading branch information
ghosind authored Oct 14, 2024
2 parents af99851 + 3c58752 commit 55690be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1115,13 +1115,15 @@ export DVM_VERSION="v0.8.3"
fi
version_prefix="$version_prefix\."

dvm_debug "searching version prefix: $version_prefix"

if ! dvm_get_remote_versions
then
dvm_failure
return
fi

tmp_versions=$(echo "$DVM_REMOTE_VERSIONS" | grep "$version_prefix" | tail -n 1)
tmp_versions=$(echo "$DVM_REMOTE_VERSIONS" | grep -E "$version_prefix" | tail -n 1)
if [ -z "$tmp_versions" ]
then
dvm_print_error "no version found by $search_text"
Expand Down Expand Up @@ -1559,7 +1561,7 @@ export DVM_VERSION="v0.8.3"
break
fi

request_url=$(echo "$DVM_REQUEST_RESPONSE" | grep "link:" | sed 's/,/\n/g' | grep "rel=\"next\"" \
request_url=$(echo "$DVM_REQUEST_RESPONSE" | grep -i "link:" | sed 's/,/\n/g' | grep "rel=\"next\"" \
| sed 's/[<>]/\n/g' | grep "http")
dvm_debug "list releases next page url: $request_url"
done
Expand Down

0 comments on commit 55690be

Please sign in to comment.