Make pkexec appear less for installs

If the remote that is being used for the install is a user remote, then pkexec will never trigger for the install loop
This commit is contained in:
heliguy4599
2023-09-12 02:32:47 -04:00
parent 0d2e0fbc9a
commit d7c9a8f73e

View File

@@ -356,6 +356,9 @@ class FlattoolGuiWindow(Adw.ApplicationWindow):
try:
subprocess.run(['flatpak-spawn', '--host', 'flatpak', 'install', '-y', remote[0], f'--{remote[1]}', id_list[i]], capture_output=False, check=True)
except subprocess.CalledProcessError:
if remote[1] == "user":
self.install_success = False
continue
try:
subprocess.run(['flatpak-spawn', '--host', 'pkexec', 'flatpak', 'install', '-y', remote[0], f'--{remote[1]}', id_list[i]], capture_output=False, check=True)
except subprocess.CalledProcessError: