From 48dda3455b8743b0f57cb454da233e386f61ffab Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sat, 20 Jul 2024 00:03:21 +0500 Subject: [PATCH] PATH definition and proper command line output. --- entrypoint.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 11ef38b..0ce044c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,13 +1,11 @@ #!/bin/bash # Entrypoint that handles both GitHub/Gitea actions things and direct commands execution. -echo "----------" -echo "Launching command:" -echo "$@" -echo "----------" - CMD=$* +# Just ensure we have PATH defined properly. +PATH="${PATH}:/usr/bin/:/usr/sbin/:/bin/:/usr/local/bin/:/opt/bin/" + if [ "${CMD}" == "" ]; then CMD="${INPUT_COMMAND}" fi @@ -17,4 +15,9 @@ if [ "${CMD}" == "" ]; then exit 1 fi +echo "----------" +echo "Launching command:" +echo "${CMD}" +echo "----------" + "${CMD}"