mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-16 05:49:59 -05:00
fix: stop makepkg from resetting sudo
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
@@ -120,7 +121,10 @@ class ArchInstaller(PackageInstaller):
|
||||
depends.append(value.strip())
|
||||
|
||||
self.install(depends, extra_flags=["--asdeps"])
|
||||
|
||||
# Stop makepkg from resetting sudo
|
||||
env = {**os.environ, "PACMAN_AUTH": "sudo"}
|
||||
# -f = force, -s = sync deps, -i = install
|
||||
subprocess.run(["makepkg", "-fsi", *self.flags], cwd=directory, check=True)
|
||||
subprocess.run(["makepkg", "-fsi", *self.flags], cwd=directory, env=env, check=True)
|
||||
|
||||
return names
|
||||
|
||||
Reference in New Issue
Block a user