Skip to content

Commit ff242fa

Browse files
committed
Don't exit the release script if there are uncommitted changes
Instead, all the user to fix them and retry.
1 parent 6c16734 commit ff242fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts-dev/release.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,10 @@ def get_repo_and_check_clean_checkout(
820820
raise click.ClickException(
821821
f"{path} is not a git repository (expecting a {name} repository)."
822822
)
823-
if repo.is_dirty():
824-
raise click.ClickException(f"Uncommitted changes exist in {path}.")
823+
while repo.is_dirty():
824+
if not click.confirm(f"Uncommitted changes exist in {path}. Commit or stash them. Ready to continue?"):
825+
raise click.ClickException("Aborted.")
826+
825827
return repo
826828

827829

0 commit comments

Comments
 (0)