Skip to content

fix_handler

appimage_updater.cli.handlers.fix_handler

Fix command handler for CLI.

FixCommandHandler()

Handler for the fix command.

Source code in src/appimage_updater/cli/handlers/fix_handler.py
def __init__(self) -> None:
    """Initialize the fix command handler."""
    self.console = Console()

console = Console() instance-attribute

get_command_name()

Get the name of this command.

Source code in src/appimage_updater/cli/handlers/fix_handler.py
def get_command_name(self) -> str:
    """Get the name of this command."""
    return "fix"

register_command(app)

Register the fix command with the Typer application.

Source code in src/appimage_updater/cli/handlers/fix_handler.py
def register_command(self, app: typer.Typer) -> None:
    """Register the fix command with the Typer application."""

    @app.command()
    def fix(  # noqa: A001 - command name
        app_name: str = typer.Argument(..., help="Name of the application to fix"),
        config_dir: Path | None = CLIOptions.CONFIG_DIR_OPTION,
        debug: bool = CLIOptions.debug_option(),
        output_format: OutputFormat = CLIOptions.FORMAT_OPTION,
        _version: bool = CLIOptions.version_option(self._version_callback),
    ) -> None:
        """Repair symlink and .info metadata for a single application."""
        self._execute_fix_command(
            app_name=app_name,
            config_dir=config_dir,
            debug=debug,
            output_format=output_format,
        )