From: Andrei Pavel Date: Fri, 16 Jun 2023 13:43:51 +0000 (+0300) Subject: [#2793] fix a mistake in JSON CI script that made it check all files when none were... X-Git-Tag: Kea-2.4.0~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01f15716d398edba948a197ca49a6bce04988de4;p=thirdparty%2Fkea.git [#2793] fix a mistake in JSON CI script that made it check all files when none were modified --- diff --git a/tools/check-for-json-errors-in-doc.sh b/tools/check-for-json-errors-in-doc.sh index a748cfb07d..732ac90b26 100755 --- a/tools/check-for-json-errors-in-doc.sh +++ b/tools/check-for-json-errors-in-doc.sh @@ -17,6 +17,11 @@ if test ${#} -gt 0; then else # By default, check only modified files. files=$(git diff --name-only $(git merge-base origin/master HEAD)) + + # If there is nothing to check, exit early. Otherwise, it checks everything. + if test -z "${files}"; then + exit 0 + fi fi exit_code=0