From 8402f345cfc9187468d988d7027b73abbab7c73d Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Wed, 30 Oct 2024 10:07:42 +1300 Subject: [PATCH] =?UTF-8?q?fix:=20exit=20with=20error=20if=20missing=20inf?= =?UTF-8?q?ormations=20=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/docker-entrypoint.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index b984aa4..af0eafb 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -37,30 +37,31 @@ action_error() { # Verify that the minimally required password settings are set for operation. function verify_minimum_env { if [ -z "$username" ]; then - action_warn "username is required for plugin operation" + action_warn "username is required for action operation" fi if [ -z "$baseurl" ]; then - action_warn "gitea_baseurl setting is required for plugin operation" + action_warn "baseurl setting is required for action operation" fi if [ -z "$owner" ]; then - action_warn "gitea_owner setting is required for plugin operation" + action_warn "owner setting is required for action operation" fi if [ -z "$access_token" ]; then - action_warn "gitea_token setting is required for plugin operation" + action_warn "access_token setting is required for action operation" fi if [ -z "$version" ]; then - action_warn "gitea_version setting is required for plugin operation" + action_warn "version setting is required for action operation" fi if [ -z "$username" ] || [ -z "$baseurl" ] || [ -z "$version" ] || [ -z "$access_token" ]; then action_error <<-'EOF' - You need to specify one/all of the following settings: - - username - - access_token - - baseurl + You need to specify one/all of the following settings: + - username + - access_token + - baseurl EOF + exit 1 fi action_note "Sufficient configuration" @@ -132,7 +133,6 @@ function process_upload_file { _main() { action_note "Starting" - env | sort verify_minimum_env "$@" process_upload_file "$@" }