fix(get_portproton_start_command): Check if flatpak command exists before trying to run it

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-12-02 18:44:47 +05:00
parent c8b91c4687
commit f4275dd465

View File

@@ -183,6 +183,22 @@ def get_portproton_start_command():
if not portproton_path:
return None
# Check if flatpak command exists before trying to run it
try:
subprocess.run(
["flatpak", "--version"],
capture_output=True,
text=True,
check=False,
timeout=5
)
flatpak_available = True
except FileNotFoundError:
flatpak_available = False
except Exception:
flatpak_available = False
if flatpak_available:
try:
result = subprocess.run(
["flatpak", "list"],