diff --git a/contrib/scripts/nm-code-format.sh b/contrib/scripts/nm-code-format.sh index 0b48ed9bbb..70eb5a7f3a 100755 --- a/contrib/scripts/nm-code-format.sh +++ b/contrib/scripts/nm-code-format.sh @@ -113,6 +113,10 @@ if [ $SHOW_FILENAMES = 1 ]; then exit 0 fi +if [ "${#FILES[@]}" = 0 ]; then + die "Error: no files to check" +fi + FLAGS_TEST=( --Werror -n --ferror-limit=1 ) if [ $TEST_ONLY = 1 ]; then