mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
ifcopenshell.validate return code 1 in case of some file is invalid
This commit is contained in:
@@ -600,6 +600,7 @@ if __name__ == "__main__":
|
||||
|
||||
filenames = [x for x in sys.argv[1:] if not x.startswith("--")]
|
||||
flags = set(x for x in sys.argv[1:] if x.startswith("--"))
|
||||
some_file_is_invalid = False
|
||||
|
||||
for fn in filenames:
|
||||
handler = None
|
||||
@@ -636,5 +637,10 @@ if __name__ == "__main__":
|
||||
else: # json_logger.
|
||||
invalid_ifc = bool(logger.statements)
|
||||
|
||||
if not invalid_ifc:
|
||||
if invalid_ifc:
|
||||
some_file_is_invalid = True
|
||||
else:
|
||||
print("No validation issues found.")
|
||||
|
||||
if some_file_is_invalid:
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user