Skip to content

Commit 1c39083

Browse files
committed
License header check ignore symlinks
The license header checks are failing when attempting to check symlinks to directorires. This removes checks on symlinks altogether. This should be fine even for links to files since even if the symlink is to a file then presumably the linked file will be checked separately.
1 parent f20d21e commit 1c39083

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/scripts/check-license-header.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ file_paths=$(echo "$exclude_list" | xargs git ls-files)
5353
while IFS= read -r file_path; do
5454
file_basename=$(basename -- "${file_path}")
5555
file_extension="${file_basename##*.}"
56+
if [[ -L "${file_path}" ]]; then
57+
continue # Ignore symbolic links
58+
fi
5659

5760
# shellcheck disable=SC2001 # We prefer to use sed here instead of bash search/replace
5861
case "${file_extension}" in

0 commit comments

Comments
 (0)