Change directory when checking ignored files (#4933)

* Change dir when checking ignored files

* Set to GITHUB_WORKSPACE
This commit is contained in:
Marco Ferrari 2023-12-06 08:32:46 +01:00 committed by GitHub
parent c5fa6a999a
commit eb688a090c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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