mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 17:54:14 +02:00
[arch] fix -> not handling conflicting files errors during the installation process
This commit is contained in:
@@ -141,12 +141,15 @@ def map_installed(names: Iterable[str] = None) -> dict: # returns a dict with w
|
||||
return pkgs
|
||||
|
||||
|
||||
def install_as_process(pkgpaths: Iterable[str], root_password: str, file: bool, pkgdir: str = '.') -> SimpleProcess:
|
||||
def install_as_process(pkgpaths: Iterable[str], root_password: str, file: bool, pkgdir: str = '.', overwrite_conflicting_files: bool = False) -> SimpleProcess:
|
||||
if file:
|
||||
cmd = ['pacman', '-U', *pkgpaths, '--noconfirm'] # pkgpath = install file path
|
||||
else:
|
||||
cmd = ['pacman', '-S', *pkgpaths, '--noconfirm'] # pkgpath = pkgname
|
||||
|
||||
if overwrite_conflicting_files:
|
||||
cmd.append('--overwrite=*')
|
||||
|
||||
return SimpleProcess(cmd=cmd,
|
||||
root_password=root_password,
|
||||
cwd=pkgdir,
|
||||
|
||||
Reference in New Issue
Block a user