remove code that shouldn't be there
This commit is contained in:
parent
8a6550db9a
commit
fb8059dd48
|
@ -165,13 +165,6 @@ func CloneAndInstallFromAUR(repoURL string, skipConfirmation bool) (string, erro
|
||||||
return "", fmt.Errorf("error changing directory: %v", err)
|
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
|
// Build the package using makepkg as the non-root user
|
||||||
cmdMakePkg := exec.Command("makepkg", "-si", "--noconfirm")
|
cmdMakePkg := exec.Command("makepkg", "-si", "--noconfirm")
|
||||||
cmdMakePkg.Env = []string{"HOME=" + usr.HomeDir, "USER=" + usr.Username, "LOGNAME=" + usr.Username}
|
cmdMakePkg.Env = []string{"HOME=" + usr.HomeDir, "USER=" + usr.Username, "LOGNAME=" + usr.Username}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user