Skip to content

edit_command

appimage_updater.commands.edit_command

Edit command implementation.

EditCommand(params)

Command to edit application configurations.

Source code in src/appimage_updater/commands/edit_command.py
def __init__(self, params: EditParams):
    self.params = params
    self.console = Console()

console = Console() instance-attribute

params = params instance-attribute

execute(output_formatter=None) async

Execute the edit command.

Source code in src/appimage_updater/commands/edit_command.py
async def execute(self, output_formatter: Any = None) -> CommandResult:
    """Execute the edit command."""
    configure_logging(debug=self.params.debug)

    try:
        # Execute main edit workflow
        return await self._execute_main_edit_workflow(output_formatter)

    except typer.Exit:
        raise
    except Exception as e:
        return self._handle_edit_execution_error(e)

validate()

Validate command parameters.

Source code in src/appimage_updater/commands/edit_command.py
def validate(self) -> list[str]:
    """Validate command parameters."""
    errors = []

    if not self.params.app_names:
        errors.append("At least one application name is required")

    return errors