Skip to content

Commit c7b9241

Browse files
committed
feat: sys.exit with return code
This will exit with a code of 1 if there are any errors.
1 parent 53b561d commit c7b9241

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/stac_api_validator/__main__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ def main(
6666
auth_query_parameter: Optional[str] = None,
6767
) -> int:
6868
"""STAC API Validator."""
69-
7069
logging.basicConfig(stream=sys.stdout, level=log_level)
7170

7271
try:
@@ -97,9 +96,9 @@ def main(
9796
click.secho("Errors: none", fg="green")
9897

9998
if errors:
100-
return 1
99+
sys.exit(1)
101100
else:
102-
return 0
101+
sys.exit(0)
103102

104103

105104
if __name__ == "__main__":

0 commit comments

Comments
 (0)