Don't exit the release script if there are uncommitted changes

Instead, all the user to fix them and retry.
This commit is contained in:
Andrew Morgan 2025-10-21 16:40:26 +01:00
parent 6c16734cf3
commit ff242faad0

View File

@ -820,8 +820,10 @@ def get_repo_and_check_clean_checkout(
raise click.ClickException(
f"{path} is not a git repository (expecting a {name} repository)."
)
if repo.is_dirty():
raise click.ClickException(f"Uncommitted changes exist in {path}.")
while repo.is_dirty():
if not click.confirm(f"Uncommitted changes exist in {path}. Commit or stash them. Ready to continue?"):
raise click.ClickException("Aborted.")
return repo