From bd7efdf7e705848487af6ffdb497628d8c510832 Mon Sep 17 00:00:00 2001 From: Thomas Leplus Date: Tue, 29 Oct 2024 16:26:37 +0530 Subject: [PATCH] Update maven-check-versions.sh --- maven-check-versions/maven-check-versions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maven-check-versions/maven-check-versions.sh b/maven-check-versions/maven-check-versions.sh index 06c9659..aed35c8 100755 --- a/maven-check-versions/maven-check-versions.sh +++ b/maven-check-versions/maven-check-versions.sh @@ -23,6 +23,17 @@ if [ "${DEBUG}" = true ]; then if [ -n "${MVNW_VERBOSE+x}" ]; then export MVNW_VERBOSE=true fi +fi + +# Support working_directory input if used as GitHub action +if [ -n "${ENV_WORKING_DIRECTORY+x}" ]; then + if [ "${DEBUG}" = true ]; then + \echo "DEBUG: changing working directory to: ${ENV_WORKING_DIRECTORY}" + fi + cd "${ENV_WORKING_DIRECTORY}" +fi + +if [ "${DEBUG}" = true ]; then \echo "DEBUG: current working directory = $(pwd)" \echo 'DEBUG:' # shellcheck disable=SC2012