From 748099a32485ee682056e30c7ed03c7ec5a74861 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 4 Mar 2025 14:02:27 -0800 Subject: [PATCH] refactor: Improve git push access check logging and error handling --- scripts/versionbump.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/versionbump.py b/scripts/versionbump.py index f626d166d..f50e24b3a 100755 --- a/scripts/versionbump.py +++ b/scripts/versionbump.py @@ -67,13 +67,14 @@ def check_main_branch_up_to_date(): def check_push_access(): print("Checking push access to origin repository...") result = subprocess.run(["git", "push", "--dry-run", "origin"], capture_output=True, text=True) + print(result.stdout) + print(result.stderr) + if result.returncode != 0: print("Error: Cannot push to origin repository.") - print(result.stderr) sys.exit(1) + print("Push access to origin repository confirmed.") - print("Git output:") - print(result.stdout) def main():