Skip to content

Commit 1bc10a9

Browse files
committed
Try alternative to xargs in validate.sh
1 parent 3b603e9 commit 1bc10a9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: tools/validate.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
#!/bin/bash
22

3-
find 'functions/' -name '*.yaml' -type f -print0 | xargs -0 -I {} tools/yajsv -s schemas/function.yaml {}
3+
exit_code=0
4+
5+
find 'functions/' -name "*.yaml" -type f | while read -r file; do
6+
tools/yajsv -s schemas/function.yaml "$file"
7+
8+
if [ $? -ne 0 ]; then
9+
exit_code=1
10+
fi
11+
done
12+
13+
exit $exit_code

0 commit comments

Comments
 (0)