From 08e863691bd26e77bfe74daf72f67c6f7a273fb0 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 3 May 2025 16:52:39 +0200 Subject: [PATCH] Exit code stuff --- .github/workflows/build.yaml | 4 +++- src/__main__.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 44b3de1..13aa562 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -62,8 +62,10 @@ jobs: echo "exit_code=$EXIT_CODE" >> $GITHUB_ENV if [ $EXIT_CODE -eq 0 ]; then echo "changes_detected=true" >> $GITHUB_ENV - elif [ $EXIT_CODE -eq 2 ]; then + elif [ $EXIT_CODE -eq 3 ]; then echo "changes_detected=false" >> $GITHUB_ENV + # Transform it to 0 to avoid failing the workflow + echo "exit_code=0" >> $GITHUB_ENV else echo "Script failed with exit code $EXIT_CODE" exit $EXIT_CODE diff --git a/src/__main__.py b/src/__main__.py index 9e53373..2764823 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -32,7 +32,7 @@ def main() -> None: if current_hash == new_hash: print("No changes") - sys.exit(2) # No changes + sys.exit(3) # No changes with out_path.open("wb") as out_file: out_file.write(new_dump)