Skip to content

Commit

Permalink
Showing 'git push' error, if applicable, including hint for solution
Browse files Browse the repository at this point in the history
Fixes #385, mostly
  • Loading branch information
reinout committed Jul 25, 2023
1 parent deab40f commit a670ac8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zest/releaser/baserelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,11 @@ def _push(self):
default_anwer = self.zest_releaser_config.push_changes()
if utils.ask("OK to push commits to the server?", default=default_anwer):
for push_cmd in push_cmds:
output = execute_command(push_cmd)
output = execute_command(
push_cmd,
allow_retry=True,
fail_message="Perhaps the main branch is protected?",
)
logger.info(output)

def _run_hooks(self, when):
Expand Down

0 comments on commit a670ac8

Please sign in to comment.