diff --git a/HISTORY.rst b/HISTORY.rst index 249d37c..f055cfb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ History ======= +0.3.11 (2024-07-31) +------------------ + +* Fix `--file-domains` option for `run-command` + 0.3.10 (2024-07-27) ------------------ diff --git a/pymultissher/__main__.py b/pymultissher/__main__.py index 3be7a85..0b24a9a 100644 --- a/pymultissher/__main__.py +++ b/pymultissher/__main__.py @@ -138,14 +138,14 @@ def run_batch( @app.command() def run_command( - filedomains: Annotated[ - Optional[str], - typer.Option(prompt=False, help="Path to the YAML file containing domain names"), - ] = YAML_FILE_DOMAINS, command: Annotated[ Optional[str], typer.Option(prompt=False, help="Command to be run on the server"), ] = "whoami", + file_domains: Annotated[ + Optional[str], + typer.Option(prompt=False, help="Path to the YAML file containing domain names"), + ] = YAML_FILE_DOMAINS, filter_domain: Annotated[ Optional[str], typer.Option(prompt=False, help="Filters domains to be used"), @@ -165,8 +165,8 @@ def run_command( ): """Runs a single command over SSH (default: whoami)""" - if not os.path.exists(filedomains): - raise FileNotFoundError(f"File not found: {filedomains}") + if not os.path.exists(file_domains): + raise FileNotFoundError(f"File not found: {file_domains}") view = view.lower() if view not in VIEW_CONSOLE_FORMATS: @@ -178,8 +178,8 @@ def run_command( logger = get_logger() ssher = MultiSSHer(logger=logger) - ssher.load_defaults(filedomains) - ssher.load_domains(filedomains) + ssher.load_defaults(file_domains) + ssher.load_domains(file_domains) filtered_domains = ssher.apply_filter_on_domains(filter=filter_domain) diff --git a/pyproject.toml b/pyproject.toml index 0c02ec5..9e86920 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" name = "pymultissher" description = "pymultissher is a simple CLI tool that runs commands on multiple servers at once using SSH" readme = "README.md" -version = "0.3.10" +version = "0.3.11" authors = [ {name = "vdmitriyev"} ]