Verified Commit f39bb930 authored by Adrian DC's avatar Adrian DC
Browse files

feat(tools): request branch user input directly if list empty

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 6cc762a4
Loading
Loading
Loading
Loading
Loading
+10
Changes for src/tools/tools.py: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ class Tools:
                f' {Colors.RESET}:',
                end='',
            )

            # User selection
            if len(branches) > 0:
                choice: Optional[str] = questionary_text(
                    message='',
                    default='',
@@ -256,6 +259,13 @@ class Tools:
                    lexer=None,
                ).ask()

            # Empty selection
            else:
                choice = '0'
                print(f'{Colors.YELLOW_LIGHT}  0'
                      f'{Colors.CYAN} (No selection available)'
                      f'{Colors.RESET}')

            # Manual branch input
            if choice and int(choice) == 0:
                print(