fix: handle case of invalid file patterns (#950)

This commit is contained in:
Tonye Jack 2023-01-18 11:54:46 -07:00 committed by GitHub
parent be519638b0
commit 0562b9f865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ fi
echo "Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
if [[ "$INPUT_HAS_CUSTOM_PATTERNS" == "false" ]]; then
if [[ "$INPUT_HAS_CUSTOM_PATTERNS" == "false" || -z "$INPUT_FILES_PATTERN_FILE" ]]; then
if [[ "$INPUT_JSON" == "false" ]]; then
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')