Fix flatpak list_apps when no apps are installed

This commit is contained in:
Kivi Kaitaniemi
2025-12-19 23:05:42 +02:00
parent 3bbd5bd521
commit 5d4065623a
+5
View File
@@ -176,6 +176,7 @@ class FlatpakCommands:
If ``as_user`` is ``True``, run the command as the user for whom packages are removed.
"""
return [
"flatpak",
"remove",
@@ -220,6 +221,10 @@ class FlatpakInterface:
)
packages = packages_text.strip().split("\n")
# In case no apps are installed, the list contains this
if "" in packages:
packages.remove("")
return set(packages)
def install(self, packages: set[str], user: str | None = None):