Skip to content

Commit 2331ef5

Browse files
authored
Merge pull request opencontainers#405 from jonboulle/fix-license-check
tools: fix license header check
2 parents 6179d36 + 898b2d7 commit 2331ef5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.tool/check-license

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ set -o pipefail
77
ret=0
88

99
for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
10-
(head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)") || (echo "${file}:missing license header" && ret=1)
10+
if ! head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)"; then
11+
echo "${file}:missing license header"
12+
ret=1
13+
fi
1114
done
1215

1316
exit $ret

0 commit comments

Comments
 (0)