diff --git a/hack/add-license.sh b/hack/add-license.sh index ca1da5112..18af2fe09 100755 --- a/hack/add-license.sh +++ b/hack/add-license.sh @@ -36,4 +36,9 @@ if [[ $mode == "check" ]]; then args+=(-check) fi -addlicense "${args[@]}" . +if ! addlicense "${args[@]}" . ; then + set +x + echo -e "\n------------------------------------------------------------------------" + echo "Error: license missing in one or more files. Run \`$0 run\` to update them." + exit 1 +fi