remove code that shouldn't be there

This commit is contained in:
VetheonGames 2024-01-08 15:34:48 -07:00
parent 8a6550db9a
commit fb8059dd48

View File

@ -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}