mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 15:40:14 +00:00
CI fetch_json: fixed when GITHUB_TOKEN not passed
When GITHUB_TOKEN was not provided, fetch_json didn't work, because it
uses positional arguments ("$@"), which were set only in this case but
not unset otherwise.
This commit is contained in:
0
.github/scripts/download-gh-asset.sh
vendored
Normal file → Executable file
0
.github/scripts/download-gh-asset.sh
vendored
Normal file → Executable file
2
.github/scripts/json-common.sh
vendored
2
.github/scripts/json-common.sh
vendored
@@ -35,6 +35,8 @@ fetch_json() {
|
||||
req_type=${3-}
|
||||
if [ -n "$github_token" ]; then
|
||||
set -- -H "Authorization: token $github_token"
|
||||
else
|
||||
set --
|
||||
fi
|
||||
status=$(curl -sS "$@" -X GET "$url" -w "%{http_code}" -o "$json")
|
||||
if ! is_int "$status" || [ "$status" -ne 200 ]; then
|
||||
|
||||
Reference in New Issue
Block a user