[arch] fix: install simulation actually installs the package when password is blank

This commit is contained in:
Vinicius Moreira
2022-02-28 15:04:00 -03:00
parent ff9d3be65b
commit 76ad2bfddc
2 changed files with 2 additions and 2 deletions

View File

@@ -2315,7 +2315,7 @@ class ArchManager(SoftwareManager):
self.logger.info("Checking for possible conflicts with '{}'".format(context.name)) self.logger.info("Checking for possible conflicts with '{}'".format(context.name))
_, output = context.handler.handle_simple(pacman.install_as_process(pkgpaths=pkgpaths, _, output = context.handler.handle_simple(pacman.install_as_process(pkgpaths=pkgpaths,
root_password=context.root_password, root_password=None,
pkgdir=context.project_dir or '.', pkgdir=context.project_dir or '.',
file=bool(context.install_files), file=bool(context.install_files),
simulate=True), simulate=True),

View File

@@ -162,7 +162,7 @@ def install_as_process(pkgpaths: Iterable[str], root_password: Optional[str], fi
cmd.append('--asdeps') cmd.append('--asdeps')
return SimpleProcess(cmd=cmd, return SimpleProcess(cmd=cmd,
root_password=root_password, root_password=None if simulate else root_password,
cwd=pkgdir, cwd=pkgdir,
error_phrases={"error: failed to prepare transaction", 'error: failed to commit transaction', 'error: target not found'}, error_phrases={"error: failed to prepare transaction", 'error: failed to commit transaction', 'error: target not found'},
shell=True) shell=True)