From fb8059dd48d0dc40fc01266b94d05e837fdab640 Mon Sep 17 00:00:00 2001 From: VetheonGames Date: Mon, 8 Jan 2024 15:34:48 -0700 Subject: [PATCH] remove code that shouldn't be there --- pkg/packagemanager/install.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/packagemanager/install.go b/pkg/packagemanager/install.go index cea9d95..48c1199 100644 --- a/pkg/packagemanager/install.go +++ b/pkg/packagemanager/install.go @@ -165,13 +165,6 @@ func CloneAndInstallFromAUR(repoURL string, skipConfirmation bool) (string, erro return "", fmt.Errorf("error changing directory: %v", err) } - // Get the username of the user who invoked sudo - sudoUser := os.Getenv("SUDO_USER") - if sudoUser == "" { - logger.Errorf("cannot determine the non-root user to run makepkg") - return "", fmt.Errorf("cannot determine the non-root user to run makepkg") - } - // Build the package using makepkg as the non-root user cmdMakePkg := exec.Command("makepkg", "-si", "--noconfirm") cmdMakePkg.Env = []string{"HOME=" + usr.HomeDir, "USER=" + usr.Username, "LOGNAME=" + usr.Username}