We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0f1ed9 commit e3ee020Copy full SHA for e3ee020
lib/utils.sh
@@ -71,6 +71,10 @@ get_download_file_path() {
71
}
72
73
get_latest_luarocks_version() {
74
- curl -sL "https://api.github.com/repos/luarocks/luarocks/tags?per_page=1&page=1" |
+ curl_opts=(-fsSL)
75
+ if [ -n "${GITHUB_API_TOKEN:-}" ]; then
76
+ curl_opts=("${curl_opts[@]}" -H "Authorization: token ${GITHUB_API_TOKEN}")
77
+ fi
78
+ curl "${curl_opts[@]}" "https://api.github.com/repos/luarocks/luarocks/tags?per_page=1&page=1" |
79
grep '"name"' | cut -d\" -f4 | cut -c2-
80
0 commit comments