Skip to content

Commit

Permalink
Merge pull request #56 from gardenlinux/fix/55-fix-program-name
Browse files Browse the repository at this point in the history
Fix program name for CLI commands
  • Loading branch information
waldiTM authored Dec 19, 2023
2 parents 52a8363 + 838f27f commit a0a371d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/glvd/cli/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ..registry import CliRegistry


cli = CliRegistry()
cli = CliRegistry('glvd')

cli.add_argument(
'--server',
Expand Down
2 changes: 1 addition & 1 deletion src/glvd/cli/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ..registry import CliRegistry


cli = CliRegistry()
cli = CliRegistry('glvd-data')

cli.add_argument(
'--database',
Expand Down
4 changes: 2 additions & 2 deletions src/glvd/cli/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class CliRegistry:

arguments: list[_ActionWrapper]

def __init__(self) -> None:
def __init__(self, name: str) -> None:
self.parser = argparse.ArgumentParser(
allow_abbrev=False,
prog='glvd',
prog=name,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
self.subparsers = self.parser.add_subparsers(
Expand Down

0 comments on commit a0a371d

Please sign in to comment.