mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] list available domains when installing an app by CLI
This commit is contained in:
parent
6a4da64be9
commit
49285f1d33
1 changed files with 8 additions and 1 deletions
|
@ -1497,7 +1497,7 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
|||
args -- A dictionnary of arguments to parse
|
||||
|
||||
"""
|
||||
from yunohost.domain import domain_list
|
||||
from yunohost.domain import domain_list, _get_maindomain
|
||||
from yunohost.user import user_info
|
||||
|
||||
args_dict = OrderedDict()
|
||||
|
@ -1537,6 +1537,13 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
|||
# Check for a password argument
|
||||
is_password = True if arg_type == 'password' else False
|
||||
|
||||
if arg_type == 'domain':
|
||||
arg_default = _get_maindomain()
|
||||
ask_string += ' (default: {0})'.format(arg_default)
|
||||
msignals.display(m18n.n('domains_available'))
|
||||
for domain in domain_list(auth)['domains']:
|
||||
msignals.display(domain)
|
||||
|
||||
try:
|
||||
input_string = msignals.prompt(ask_string, is_password)
|
||||
except NotImplementedError:
|
||||
|
|
Loading…
Add table
Reference in a new issue