fix(setup): prevent case when user fill nothinf in multiple get_multiple

This commit is contained in:
Romain J 2020-06-05 00:36:20 +02:00
parent 7c75b0efad
commit fbafd03ea9

View file

@ -219,7 +219,11 @@ def get_multiple(question: str, confirmation: str, value_type: type)\
List containing user filled values.
"""
print(question)
values = [value_type(input('> '))]
user_input = input('> ')
if not user_input:
return []
values = [user_input]
while click.confirm(confirmation, default=False):
values.append(value_type(input('> ')))