From d7bcd431a716c559a01a87f0dd7b3e81d203d59a Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Tue, 27 Jan 2026 00:39:42 -0500 Subject: [PATCH] Refactor application_handler to use DI (#4172) --- archinstall/lib/applications/application_handler.py | 3 --- archinstall/scripts/guided.py | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/archinstall/lib/applications/application_handler.py b/archinstall/lib/applications/application_handler.py index 10066711..a4cc6284 100644 --- a/archinstall/lib/applications/application_handler.py +++ b/archinstall/lib/applications/application_handler.py @@ -44,6 +44,3 @@ class ApplicationHandler: install_session, app_config.firewall_config, ) - - -application_handler = ApplicationHandler() diff --git a/archinstall/scripts/guided.py b/archinstall/scripts/guided.py index aa0d878e..c8f6d95a 100644 --- a/archinstall/scripts/guided.py +++ b/archinstall/scripts/guided.py @@ -2,7 +2,7 @@ import os import time from pathlib import Path -from archinstall.lib.applications.application_handler import application_handler +from archinstall.lib.applications.application_handler import ApplicationHandler from archinstall.lib.args import arch_config_handler from archinstall.lib.authentication.authentication_handler import AuthenticationHandler from archinstall.lib.configuration import ConfigurationOutput @@ -55,6 +55,7 @@ def perform_installation( mountpoint: Path, mirror_list_handler: MirrorListHandler, auth_handler: AuthenticationHandler, + application_handler: ApplicationHandler, ) -> None: """ Performs the installation steps on a block device. @@ -224,6 +225,7 @@ def guided() -> None: arch_config_handler.args.mountpoint, mirror_list_handler, AuthenticationHandler(), + ApplicationHandler(), )