Skip to content

Commit

Permalink
fix(#275): shellcheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
slry committed Jun 9, 2024
1 parent 5e4fe16 commit a5dd1c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/copyright_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ jobs:
echo "Current year is $current_year."
# Iterate over files, redirecting into while loop to avoid subshell
find $search_dir -type f -print0 | while IFS= read -r -d $'\0' file;
do
find $search_dir -type f -print0 > tmp.$$ || exit 1
while IFS= read -r -d $'\0' file; do
# Skip files in the ignore list
skip_file=false
for ignore_pattern in "${ignore_files[@]}"; do
# shellcheck disable=SC2254
if [[ "$file" == $ignore_pattern ]]; then
skip_file=true
break
Expand All @@ -87,7 +88,8 @@ jobs:
fi
fi
fi
done
done < tmp.$$
rm tmp.$$ # Clean up temporary file
echo "Check complete."
exit $exit_code

0 comments on commit a5dd1c8

Please sign in to comment.