Skip to content

Commit

Permalink
FIX: fix the name --file-domains option for run-command
Browse files Browse the repository at this point in the history
  • Loading branch information
vdmitriyev committed Jul 31, 2024
1 parent 5555913 commit face5df
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
History
=======

0.3.11 (2024-07-31)
------------------

* Fix `--file-domains` option for `run-command`

0.3.10 (2024-07-27)
------------------

Expand Down
16 changes: 8 additions & 8 deletions pymultissher/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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:
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
]
Expand Down

0 comments on commit face5df

Please sign in to comment.