From 4e97393ea22bf06bf8c5464dc987e938e9015f69 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 28 Aug 2023 13:45:55 -0500 Subject: [PATCH] fix: Do not send notifications with checkonly flag --- src/ReVancedBuilder/Cleanup.py | 3 ++- src/ReVancedBuilder/ReVancedBuilder.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ReVancedBuilder/Cleanup.py b/src/ReVancedBuilder/Cleanup.py index 2c4ae8d..2baec2b 100644 --- a/src/ReVancedBuilder/Cleanup.py +++ b/src/ReVancedBuilder/Cleanup.py @@ -58,7 +58,8 @@ def err_exit(msg, appstate, code=1): try: appstate['notification_config'] - send_notif(appstate, error=True) + if appstate['flag'] != 'checkonly': + send_notif(appstate, error=True) except: pass diff --git a/src/ReVancedBuilder/ReVancedBuilder.py b/src/ReVancedBuilder/ReVancedBuilder.py index ff0a7d1..c80d3d2 100755 --- a/src/ReVancedBuilder/ReVancedBuilder.py +++ b/src/ReVancedBuilder/ReVancedBuilder.py @@ -174,7 +174,7 @@ if (flag != 'checkonly' and not appstate['up-to-date']) or flag in ['force', 'bu # Update version numbers in the versions.json file if appstate['up-to-date'] and flag != 'buildonly': print('There\'s nothing to do.') -elif flag != ['checkonly']: +elif flag != 'checkonly': send_notif(appstate) try: os.rename('versions.json', 'versions-old.json')