fix: Improve error message formatting for branch detection failure

- Enhance readability of error message when current branch cannot be determined
- Add double newline after error message for better visual separation
- Maintain consistent output formatting with other status messages
This commit is contained in:
bobo.yang 2025-03-07 11:05:20 +08:00
parent e36da6da6c
commit f6c4d52b90

View File

@ -385,7 +385,7 @@ def push_changes():
try: try:
current_branch = get_current_branch() current_branch = get_current_branch()
if not current_branch: if not current_branch:
print("Could not determine current branch. Push failed.", file=sys.stderr, flush=True) print("Could not determine current branch. Push failed.", end="\n\n", file=sys.stderr, flush=True)
return False return False
print(f"Pushing changes to origin/{current_branch}...", end="\n\n", flush=True) print(f"Pushing changes to origin/{current_branch}...", end="\n\n", flush=True)