Skip to content

Commit

Permalink
Change continue prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
yalef committed Nov 27, 2023
1 parent feb7a73 commit dbe33fc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions saritasa_invocations/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ def blame_copy(
commits_count=len(destination_paths_list) + 3,
),
)

input("Press any key to continue\n")

_display_continue_prompt()
# formatted commit template with only space for action
printing.print_success("Build formatted commit")
formatted_commit_template = config.git.copy_commit_template.format(
Expand Down Expand Up @@ -277,6 +275,16 @@ def _get_project_task_from_current_branch(
return task


def _display_continue_prompt():
"""Display continue message.
If `n` entered, then exit script.
"""
if input("Continue? [Enter/N]: ").lower() == "n":
raise invoke.Exit("Exit from script", code=1)


def _get_command_output(
context: invoke.Context,
command: str,
Expand Down

0 comments on commit dbe33fc

Please sign in to comment.