mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
fix: No second sudo password prompt while installing yay
makepkg -si installs with sudo -k, which forgets the cached password. Build with makepkg, install with sudo pacman -U.
This commit is contained in:
1 parent
1522e5632d
commit
6c2e203563
2 files changed
+9
-1
No files matched your search
+6
-1
@@ -41,8 +41,13 @@ bootstrap_yay() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Build only, then install it ourselves: makepkg -i runs `sudo -k pacman`,
|
||||
# which forgets the cached sudo password and asks for it again.
|
||||
info "Building and installing yay (this runs makepkg as your user, not root)..."
|
||||
if (cd "$tmp_dir/yay-bin" && makepkg -si --noconfirm); then
|
||||
local -a pkgs
|
||||
if (cd "$tmp_dir/yay-bin" && makepkg --noconfirm) &&
|
||||
mapfile -t pkgs < <(cd "$tmp_dir/yay-bin" && makepkg --packagelist | grep -v -- '-debug-') &&
|
||||
sudo pacman -U --noconfirm "${pkgs[@]}"; then
|
||||
ok "yay installed."
|
||||
rm -rf "$tmp_dir"
|
||||
return 0
|
||||
|
||||
Reference in new issue
Block a user