Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/xts_core/xts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class XTS():
_xts_config (dict, optional): Parsed XTS configuration data. Defaults to None.
_command_sections (dict): Dictionary of command sections extracted from configuration.
_plugins (list): List of plugin classes providing additional commands.
_alias_name (str, optional): The alias name used to invoke the command. Defaults to None.
"""

def __init__(self):
Expand All @@ -86,6 +87,7 @@ def __init__(self):
self._xts_config = None
self._command_sections = {}
self._plugins = [XTSAllocatorClient]
self._alias_name = None

@property
def xts_config(self):
Expand Down Expand Up @@ -202,6 +204,7 @@ def _parse_first_arg(self):

# load xts config remove alias name from argv before parsing
self.xts_config = resolved_xts_path
self._alias_name = alias_name

return remaining_args[1:]

Expand All @@ -214,9 +217,10 @@ def run(self):
args = self._parse_first_arg()

try:
prog_name = f'xts {self._alias_name}' if self._alias_name else 'xts'
yaml_runner = YamlRunner(
self._command_sections,
program='xts',
program=prog_name,
hierarchical=True,
fail_fast=True,
parser_class=XTSArgumentParser
Expand Down
Loading