Merge pull request #244 from Morganamilo/fix#241

Error when installing AUR packages as root
This commit is contained in:
Morgana 2018-03-14 13:08:33 +00:00 committed by GitHub
commit 4c601c362b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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