Skip to content

Commit 9f7c2dd

Browse files
committed
Silently ignore .licenseignore and .license_header_template
1 parent 6aa8cf2 commit 9f7c2dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ fi
4040

4141
paths_with_missing_license=( )
4242

43-
file_paths=$(tr '\n' '\0' < .licenseignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files)
43+
file_excludes=".license_header_template
44+
.licenseignore"
45+
if [ -f .licenseignore ]; then
46+
file_excludes=$file_excludes\n$(cat .licenseignore)
47+
fi
48+
file_paths=$(echo "$file_excludes" | tr '\n' '\0' | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files)
4449

4550
while IFS= read -r file_path; do
4651
file_basename=$(basename -- "${file_path}")

0 commit comments

Comments
 (0)