From b4e9d9ec584c50bbf46d39f11a0abd433a7fb892 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Fri, 19 Jul 2024 23:54:51 +0500 Subject: [PATCH] Try to use INPUT_COMMAND variable while at actions mode. --- entrypoint.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index d60d2e0..11ef38b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,4 +6,15 @@ echo "Launching command:" echo "$@" echo "----------" -"$@" +CMD=$* + +if [ "${CMD}" == "" ]; then + CMD="${INPUT_COMMAND}" +fi + +if [ "${CMD}" == "" ]; then + echo "! No command to run!" + exit 1 +fi + +"${CMD}"