diff --git a/scripts/indexer-sync-v2.sh b/scripts/indexer-sync-v2.sh index 3d89d28fd..38dc2caa9 100644 --- a/scripts/indexer-sync-v2.sh +++ b/scripts/indexer-sync-v2.sh @@ -51,7 +51,7 @@ determine_schema_version() { npx ajv test -d "$def_file" -s "$schema" --valid -c ajv-formats --spec=draft2019 test_output=$? - if $test_output; then + if [ "$test_output" = 0 ]; then log "INFO" "Definition [$def_file] matches schema [$schema]" else check_version="v0" @@ -72,7 +72,7 @@ determine_best_schema_version() { npx ajv test -d "$def_file" -s "$schema" --valid -c ajv-formats --spec=draft2019 test_output=$? - if $test_output; then + if [ "$test_output" = 0 ]; then log "INFO" "Definition [$def_file] matches schema [$schema]" matched_version=$i export matched_version