mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 01:27:21 +01:00
Merge pull request #244 from Morganamilo/fix#241
Error when installing AUR packages as root
This commit is contained in:
commit
4c601c362b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user