Skip to content

Commit b84875f

Browse files
committed
Add version argument
Signed-off-by: Tim Walter <tim.walter@iteratec.com>
1 parent 2a32d5b commit b84875f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kcwarden/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import argparse
22
import sys
3+
from importlib.metadata import version
34

45
from kcwarden.subcommands import download, audit, configuration, review
56
from kcwarden.utils.arguments import is_dir
@@ -22,6 +23,8 @@ def get_parsers() -> argparse.ArgumentParser:
2223
description="Keycloak configuration auditor",
2324
)
2425

26+
parser.add_argument("--version", action="version", version=f"%(prog)s {version('kcwarden')}")
27+
2528
subparsers = parser.add_subparsers(required=True)
2629

2730
#

0 commit comments

Comments
 (0)