mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 01:27:21 +01:00
Merge pull request #276 from Morganamilo/fixagain
Fix nothing to do if upgrading only repo packages
This commit is contained in:
commit
f1fd4a1203
11
install.go
11
install.go
@ -91,7 +91,14 @@ func install(parser *arguments) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hasAur := len(dt.Aur) != 0
|
hasAur := false
|
||||||
|
for pkg := range parser.targets {
|
||||||
|
_, ok := dt.Aur[pkg]
|
||||||
|
if ok {
|
||||||
|
hasAur = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if hasAur && 0 == os.Geteuid() {
|
if hasAur && 0 == os.Geteuid() {
|
||||||
return fmt.Errorf(red(arrow + " Refusing to install AUR Packages as root, Aborting."))
|
return fmt.Errorf(red(arrow + " Refusing to install AUR Packages as root, Aborting."))
|
||||||
}
|
}
|
||||||
@ -108,7 +115,7 @@ func install(parser *arguments) error {
|
|||||||
arguments.addTarget(pkg)
|
arguments.addTarget(pkg)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(dc.Aur) == 0 && len(arguments.targets) == 0 {
|
if len(dc.Aur) == 0 && len(arguments.targets) == 0 && !parser.existsArg("u", "sysupgrade") {
|
||||||
fmt.Println("There is nothing to do")
|
fmt.Println("There is nothing to do")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user