|
9 | 9 | def detect_package_type_from_asset_name(name: str) -> Optional[str]: |
10 | 10 | """Infer package type from asset filename. Returns None if not a known package.""" |
11 | 11 | ext = name.lower().rsplit(".", 1)[-1] if "." in name else "" |
| 12 | + if ext == "appimage": |
| 13 | + return "AppImage" |
12 | 14 | if ext in _valid_package_types: |
13 | 15 | return ext |
14 | 16 | return None |
@@ -79,7 +81,7 @@ def detect_package_type_from_os_release() -> Optional[str]: |
79 | 81 | else: |
80 | 82 | # Fallback to AppImage for other Linux distros |
81 | 83 | logger.debug("No specific package manager detected, using AppImage") |
82 | | - package_type = "appimage" |
| 84 | + package_type = "AppImage" |
83 | 85 |
|
84 | 86 | if package_type not in _valid_package_types: |
85 | 87 | raise ValueError(f"Unsupported package type: {package_type}") |
@@ -126,10 +128,10 @@ def install_package( |
126 | 128 | installer = RpmPackage(name) |
127 | 129 | logger.info("Installing RPM package this will need sudo permissions...") |
128 | 130 | result = installer.install(package_path) |
129 | | - elif package_type == "appimage": |
130 | | - from InstallRelease.pkgs.app_images import AppImageInstaller |
| 131 | + elif package_type == "AppImage": |
| 132 | + from InstallRelease.pkgs.app_images import AppImage |
131 | 133 |
|
132 | | - installer = AppImageInstaller(name) |
| 134 | + installer = AppImage(name) |
133 | 135 | result = installer.install(package_path) |
134 | 136 | else: |
135 | 137 | logger.error(f"Unsupported package type: {package_type}") |
|
0 commit comments