mirror of
https://git.dn42.dev/dn42/registry.git
synced 2025-05-06 12:45:21 +08:00
check-pol calls dn42-schema with invalid args if filter.txt has been edited
There's no need to validate $LINE[1] if $LINE[2] is nonempty. (Except if git emits a path with "//", but I don't think this can happen.)
This commit is contained in:
parent
9c2a6c7cfd
commit
43ea241e7c
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ BASE="$(dirname "$BASE")"
|
|||
cd "$BASE" || exit 1
|
||||
|
||||
git diff --name-only $1 | while IFS='/' read -ra LINE; do
|
||||
if [[ "${LINE[0]}" = "data" ]]; then
|
||||
if [[ "${LINE[0]}" = "data" && -n "${LINE[2]}" ]]; then
|
||||
utils/schema-check/dn42-schema.py -v policy ${LINE[1]} ${LINE[2]} $2
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue