Skip to content

Commit a31400a

Browse files
committed
Use find instead of glob in validation script
Because they have different behaviour when there's no matches!
1 parent 60695eb commit a31400a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎brat/tools/validate.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ for json in test/compilation/output/*.json; do
2222
fi
2323
done
2424

25-
for invalid_json in test/compilation/output/*.json.invalid; do
25+
for invalid_json in $(find . -maxdepth 1 -name "test/compilation/output/*.json.invalid"); do
2626
if (hugr_validator < $invalid_json 2>/dev/null > /dev/null); then
2727
UNEXPECTED_PASSES="$UNEXPECTED_PASSES $invalid_json"
2828
fi
@@ -51,4 +51,4 @@ if [ "$UNEXPECTED_PASSES" != "" ]; then
5151
echo -e $RED "There were unexpected passes: $UNEXPECTED_PASSES" $NO_COLOUR
5252
RESULT=1
5353
fi
54-
exit $RESULT
54+
exit $RESULT

0 commit comments

Comments
 (0)