mirror of
https://github.com/actions/runner.git
synced 2025-12-13 00:36:29 +00:00
missing validation
This commit is contained in:
@@ -31,8 +31,12 @@ function fatal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "${runner_scope}" ]; then fatal "supply scope as argument 1"; fi
|
if [ -z "${runner_scope}" ]; then fatal "supply scope as argument 1"; fi
|
||||||
|
if [ -z "${runner_name}" ]; then fatal "supply name as argument 2"; fi
|
||||||
if [ -z "${RUNNER_CFG_PAT}" ]; then fatal "RUNNER_CFG_PAT must be set before calling"; fi
|
if [ -z "${RUNNER_CFG_PAT}" ]; then fatal "RUNNER_CFG_PAT must be set before calling"; fi
|
||||||
|
|
||||||
|
which curl || fatal "curl required. Please install in PATH with apt-get, brew, etc"
|
||||||
|
which jq || fatal "jq required. Please install in PATH with apt-get, brew, etc"
|
||||||
|
|
||||||
base_api_url="https://api.github.com/orgs"
|
base_api_url="https://api.github.com/orgs"
|
||||||
if [[ "$runner_scope" == *\/* ]]; then
|
if [[ "$runner_scope" == *\/* ]]; then
|
||||||
base_api_url="https://api.github.com/repos"
|
base_api_url="https://api.github.com/repos"
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ function fatal()
|
|||||||
if [ -z "${runner_scope}" ]; then fatal "supply scope as argument 1"; fi
|
if [ -z "${runner_scope}" ]; then fatal "supply scope as argument 1"; fi
|
||||||
if [ -z "${RUNNER_CFG_PAT}" ]; then fatal "RUNNER_CFG_PAT must be set before calling"; fi
|
if [ -z "${RUNNER_CFG_PAT}" ]; then fatal "RUNNER_CFG_PAT must be set before calling"; fi
|
||||||
|
|
||||||
|
which curl || fatal "curl required. Please install in PATH with apt-get, brew, etc"
|
||||||
|
which jq || fatal "jq required. Please install in PATH with apt-get, brew, etc"
|
||||||
|
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Get a remove token
|
# Get a remove token
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user