Merge branch 'add_config_list'

main
Micke Nordin 2 weeks ago
commit 5ea14a1a38

@ -155,6 +155,7 @@ def run_config(
config_filename: str,
context: Union[None, str] = None,
baseurl: Union[None, str] = None,
list_config: bool = False,
username: Union[None, str] = None,
password: Union[None, str] = None,
current: Union[None, str] = None,
@ -179,6 +180,11 @@ def run_config(
config_filename = symlink
if found:
return
if list_config:
config_data = get_config(config_filename)
config_data.pop("password", None)
output(config_data)
return
if not baseurl:
needed.append("baseurl")
if not username:
@ -493,6 +499,7 @@ def get_parser() -> dict:
configcmd.add_argument("-C",
"--current",
action=argparse.BooleanOptionalAction)
configcmd.add_argument("-l", "--list", action="store_true")
configcmd.add_argument("-p", "--password")
configcmd.add_argument("-u", "--username")
@ -637,6 +644,7 @@ def main() -> int:
args.context,
args.baseurl,
args.username,
args.list,
args.password,
args.current,
)

Loading…
Cancel
Save