From 3e652d6feabc94fc8014fd4c1eb176a64e36c2b1 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Mon, 4 Apr 2022 14:22:24 -0400 Subject: [PATCH] Add helpful error message to license check --- hack/add-license.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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