forked from Shinonome/caelestia-cli
fix: stop makepkg from resetting sudo
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
@@ -120,7 +121,10 @@ class ArchInstaller(PackageInstaller):
|
|||||||
depends.append(value.strip())
|
depends.append(value.strip())
|
||||||
|
|
||||||
self.install(depends, extra_flags=["--asdeps"])
|
self.install(depends, extra_flags=["--asdeps"])
|
||||||
|
|
||||||
|
# Stop makepkg from resetting sudo
|
||||||
|
env = {**os.environ, "PACMAN_AUTH": "sudo"}
|
||||||
# -f = force, -s = sync deps, -i = install
|
# -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
|
return names
|
||||||
|
|||||||
Reference in New Issue
Block a user