mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Allow to pass the admin password as argument in the cli
This commit is contained in:
parent
5cd3a86099
commit
a9046a7200
1 changed files with 5 additions and 1 deletions
|
@ -66,6 +66,10 @@ def _parse_cli_args():
|
||||||
action='store_true', default=False,
|
action='store_true', default=False,
|
||||||
help="Don't produce any output",
|
help="Don't produce any output",
|
||||||
)
|
)
|
||||||
|
parser.add_argument('--admin-password',
|
||||||
|
default=None, dest='password', metavar='PASSWORD',
|
||||||
|
help="The admin password to use to authenticate",
|
||||||
|
)
|
||||||
# deprecated arguments
|
# deprecated arguments
|
||||||
parser.add_argument('--plain',
|
parser.add_argument('--plain',
|
||||||
action='store_true', default=False, help=argparse.SUPPRESS
|
action='store_true', default=False, help=argparse.SUPPRESS
|
||||||
|
@ -199,6 +203,6 @@ if __name__ == '__main__':
|
||||||
from moulinette import cli
|
from moulinette import cli
|
||||||
ret = cli(_retrieve_namespaces(), args,
|
ret = cli(_retrieve_namespaces(), args,
|
||||||
use_cache=opts.use_cache, output_as=opts.output_as,
|
use_cache=opts.use_cache, output_as=opts.output_as,
|
||||||
parser_kwargs={'top_parser': parser}
|
password=opts.password, parser_kwargs={'top_parser': parser}
|
||||||
)
|
)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue