diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index e527a4a7..e7ba1361 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -428,7 +428,10 @@ function BuildFileList() { ######################## # Use BASE_FILE here because FILE_TYPE is not reliable when there is no file extension elif [[ "${FILE_TYPE}" != "tap" ]] && [[ "${FILE_TYPE}" != "yml" ]] && - [[ "${FILE_TYPE}" != "yaml" ]] && [[ "${FILE_TYPE}" != "json" ]] && [[ "${FILE_TYPE}" != "xml" ]] && [[ "${BASE_FILE}" =~ .*(contain|dock)erfile.* ]]; then + [[ "${FILE_TYPE}" != "yaml" ]] && [[ "${FILE_TYPE}" != "json" ]] && + [[ "${FILE_TYPE}" != "xml" ]] && + [[ "${BASE_FILE}" =~ ^(.+\.)?(contain|dock)erfile$ ]]; then + ################################ # Append the file to the array # ################################