Commit 1c11cf1a authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

force value from list

parent 6a4262c6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -412,7 +412,10 @@ def _choose_between(values: List[str], label: str = "") -> str:
        menu_entry_index = terminal_menu.show()
        return values[menu_entry_index]
    except NotImplementedError:  # mainly windows
        return typer.prompt("{} ({})".format(_(label), ", ".join(values)))
        choice = None
        while choice not in values:
            choice = typer.prompt("{} ({})".format(_(label), ", ".join(values)))
        return choice


@app.command(help=_("Création d'une nouvelle instance de MaX"))