mirror of
https://github.com/actions/runner.git
synced 2025-12-10 04:06:57 +00:00
jq returns "null" if the field does not exist (#478)
This commit is contained in:
@@ -81,7 +81,7 @@ fi
|
||||
|
||||
export RUNNER_TOKEN=$(curl -s -X POST ${base_api_url}/${orgs_or_repos}/${runner_scope}/actions/runners/registration-token -H "accept: application/vnd.github.everest-preview+json" -H "authorization: token ${RUNNER_CFG_PAT}" | jq -r '.token')
|
||||
|
||||
if [ -z "$RUNNER_TOKEN" ]; then fatal "Failed to get a token"; fi
|
||||
if [ "null" == "$RUNNER_TOKEN" -o -z "$RUNNER_TOKEN" ]; then fatal "Failed to get a token"; fi
|
||||
|
||||
#---------------------------------------
|
||||
# Download latest released and extract
|
||||
|
||||
Reference in New Issue
Block a user