Skip to content

Commit 852b4e8

Browse files
authored
Merge pull request #2 from aboutcode-org/fail-ci-on-pipeline-error
Fail workflow on pipeline errors
2 parents dfc84a8 + 8289d06 commit 852b4e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sync_catalog.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
import json
10+
import sys
1011
from datetime import datetime
1112
from datetime import timezone
1213
from pathlib import Path
@@ -81,6 +82,6 @@ def fetch_and_write(self, url, path):
8182

8283

8384
if __name__ == "__main__":
84-
error, error_msg = NuGetCatalogMirror().execute()
85-
if error:
86-
print(error_msg)
85+
status_code, error_msg = NuGetCatalogMirror().execute()
86+
print(error_msg)
87+
sys.exit(status_code)

0 commit comments

Comments
 (0)