Skip to content

Commit

Permalink
Merge pull request #32 from mehalter/escape_url
Browse files Browse the repository at this point in the history
fix: escape URL string to handle special characters
  • Loading branch information
rkyleg authored Nov 26, 2023
2 parents 1788f0f + cf9e92a commit 08ddbff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ releases_path="https://api.github.com/repos/JuliaLang/julia/releases?page="
page=0

if [ -n "$GITHUB_API_TOKEN" ]; then
cmd="$cmd -H 'Authorization: token $GITHUB_API_TOKEN' $releases_path"
cmd="$cmd -H 'Authorization: token $GITHUB_API_TOKEN'"
fi
cmd="$cmd $releases_path"

while (( ++page == 1 )) || grep -q 'rel="next"' $headers; do
eval $cmd$page >> $releases
eval "$cmd '$releases_path$page'" >>$releases
done

versions=($(sed -n 's/.*"tag_name": "\(.*\)",/\1/p' $releases | sed 'y/v/ /' | sort_versions))
Expand Down

0 comments on commit 08ddbff

Please sign in to comment.