flatpak requires user input, assume yes

main
mirkobrombin 2 years ago
parent 071ad20034
commit b7cfd8fc6b

@ -7,30 +7,32 @@ class Flatpak:
@staticmethod @staticmethod
def install(packages: list): def install(packages: list):
subprocess.run( proc = subprocess.Popen(
['flatpak', 'install', '--user'] + packages, ['flatpak', 'install', '--user'] + packages,
env=Flatpak.env, env=Flatpak.env,
check=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE stderr=subprocess.PIPE
) )
proc.communicate(input=b'y\n')
@staticmethod @staticmethod
def remove(packages: list): def remove(packages: list):
subprocess.run( proc = subprocess.Popen(
['flatpak', 'remove', '--user'] + packages, ['flatpak', 'remove', '--user'] + packages,
env=Flatpak.env, env=Flatpak.env,
check=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE stderr=subprocess.PIPE
) )
proc.communicate(input=b'y\n')
@staticmethod @staticmethod
def add_repo(repo: str): def add_repo(repo: str):
subprocess.run( proc = subprocess.Popen(
['flatpak', 'remote-add', '--user', '--if-not-exists', repo], ['flatpak', 'remote-add', 'test', '--user', '--if-not-exists', repo],
env=Flatpak.env, env=Flatpak.env,
check=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE stderr=subprocess.PIPE
) )
proc.communicate(input=b'y\n')

Loading…
Cancel
Save