Skip to content

Commit b44c1a2

Browse files
author
William Speirs
committed
Added call to check_schema before checking instance
1 parent 41f2f8d commit b44c1a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jsonschema/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def run(arguments, stdout=sys.stdout, stderr=sys.stderr):
6565
error_format = arguments["error_format"]
6666
validator = arguments["validator"](schema=arguments["schema"])
6767
errored = False
68+
69+
# add a check to the schema file first
70+
validator.check_schema(arguments["schema"])
71+
6872
for instance in arguments["instances"] or ():
6973
for error in validator.iter_errors(instance):
7074
stderr.write(error_format.format(error=error))

0 commit comments

Comments
 (0)