diff --git a/.github/validate-overrides.sh b/.github/validate-overrides.sh index 3ae9767..afd02da 100644 --- a/.github/validate-overrides.sh +++ b/.github/validate-overrides.sh @@ -11,11 +11,12 @@ OVERRIDES_DIR="$SCRIPT_DIR/overrides/build-meta" FILES_WITH_TWO_LINES="" # Find all files which contain at lest two lines -for file in $(find "$OVERRIDES_DIR" -type f); do +while IFS= read -r -d '' file +do if [ "$(wc -l < "$file")" -gt 1 ]; then FILES_WITH_TWO_LINES="$FILES_WITH_TWO_LINES $file" fi -done +done < <(find "$OVERRIDES_DIR" -type f -print0) # Check for newlines in overrides if [ -n "$FILES_WITH_TWO_LINES" ]; then