Skip to content

Commit 88b03ae

Browse files
authored
Exit with exit code 1 when there was no update made. (#5797)
1 parent 3cd2fd9 commit 88b03ae

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

utils/scripts/activate-easy-wins.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import argparse
44
import json
55
import os
6+
import sys
67
import zipfile
78
from enum import Enum
89
from pathlib import Path
@@ -519,6 +520,10 @@ def main() -> None:
519520
elif not args.summary_only: # Only show zero counts in detailed mode
520521
print(f" • {library}: 0")
521522

523+
# Exit with non-zero status if no updates were made (or would be made in dry-run)
524+
if total_updates == 0:
525+
sys.exit(1)
526+
522527

523528
if __name__ == "__main__":
524529
main()

utils/scripts/activate-easy-wins.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
perl -pi -e 's/^(\s*)(.*\*r.*)(#.*)$/$1$3\n$1$2/' manifests/*.yml
44
perl -pi -e 's/^(\s*)(- &ref.*)(#.*)$/$1$3\n$1$2/' manifests/*.yml
55
python ./utils/scripts/activate-easy-wins.py "$@"
6+
exit_code=$?
67
./format.sh
8+
exit $exit_code
79

810

0 commit comments

Comments
 (0)