Skip to content

Commit 2649739

Browse files
authored
Merge pull request #217 from /issues/209-non-zero-exit-code
sys.exit with return code
2 parents 53b561d + c7b9241 commit 2649739

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)