From 12eef67c61b8c90e026edb4521b6331337b9d8e7 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Sun, 27 Feb 2022 14:41:55 +0100 Subject: [PATCH] Expand file pattern array in git-status --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5d2206a..3f745f6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -40,8 +40,11 @@ _git_is_dirty() { echo "INPUT_STATUS_OPTIONS: ${INPUT_STATUS_OPTIONS}"; echo "::debug::Apply status options ${INPUT_STATUS_OPTIONS}"; + echo "INPUT_FILE_PATTERN: ${INPUT_FILE_PATTERN}"; + INPUT_FILE_PATTERN_ARRAY=( ${INPUT_FILE_PATTERN} ) + # shellcheck disable=SC2086 - [ -n "$(git status -s $INPUT_STATUS_OPTIONS -- $INPUT_FILE_PATTERN)" ] + [ -n "$(git status -s $INPUT_STATUS_OPTIONS -- ${INPUT_FILE_PATTERN:+${INPUT_FILE_PATTERN_ARRAY[@]}})" ] } _switch_to_branch() {