Skip to content

Commit

Permalink
Try alternative to xargs in validate.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
botder committed Oct 10, 2024
1 parent 3b603e9 commit 1bc10a9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/validate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#!/bin/bash

find 'functions/' -name '*.yaml' -type f -print0 | xargs -0 -I {} tools/yajsv -s schemas/function.yaml {}
exit_code=0

find 'functions/' -name "*.yaml" -type f | while read -r file; do
tools/yajsv -s schemas/function.yaml "$file"

if [ $? -ne 0 ]; then
exit_code=1
fi
done

exit $exit_code

0 comments on commit 1bc10a9

Please sign in to comment.