Error when installing AUR packages as root

This commit is contained in:
morganamilo 2018-03-14 13:04:14 +00:00
parent 345cc5475b
commit de29fc1b0f
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E

View file

@ -95,6 +95,9 @@ func install(parser *arguments) error {
}
hasAur := len(dt.Aur) != 0
if hasAur && 0 == os.Geteuid() {
return fmt.Errorf(red(arrow + " Refusing to install AUR Packages as root, Aborting."))
}
dc, err = getDepCatagories(parser.formatTargets(), dt)
if err != nil {
return err