From eb688a090cf7d2ee4f179a7caf18a996158fd989 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Wed, 6 Dec 2023 08:32:46 +0100 Subject: [PATCH] Change directory when checking ignored files (#4933) * Change dir when checking ignored files * Set to GITHUB_WORKSPACE --- lib/functions/buildFileList.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index 252f349e..1ff6bdfa 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -227,7 +227,7 @@ function BuildFileList() { ################################################### # Filter files if FILTER_REGEX_EXCLUDE is not set # ################################################### - if [ "${IGNORE_GITIGNORED_FILES}" == "true" ] && git check-ignore "$FILE"; then + if [ "${IGNORE_GITIGNORED_FILES}" == "true" ] && git -C "${GITHUB_WORKSPACE}" check-ignore "$FILE"; then debug "${FILE} is ignored by Git. Skipping ${FILE}" continue fi