From 52ff9b4f59845d22a62a8ebe4eec2fdf62a6dc39 Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Wed, 15 Apr 2020 13:51:34 -0400 Subject: [PATCH] missing validation --- scripts/delete.sh | 4 ++++ scripts/remove-svc.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/scripts/delete.sh b/scripts/delete.sh index 30e23eb70..1b060c5aa 100755 --- a/scripts/delete.sh +++ b/scripts/delete.sh @@ -31,8 +31,12 @@ function fatal() } 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 +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" if [[ "$runner_scope" == *\/* ]]; then base_api_url="https://api.github.com/repos" diff --git a/scripts/remove-svc.sh b/scripts/remove-svc.sh index bbe7be951..e588d6904 100755 --- a/scripts/remove-svc.sh +++ b/scripts/remove-svc.sh @@ -35,6 +35,9 @@ function fatal() 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 +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 #--------------------------------------