mirror of
https://github.com/Jguer/yay
synced 2024-08-31 21:58:39 +00:00
install.go: swap if branches for readability
This commit is contained in:
parent
873b2db591
commit
4f35c2c4fe
|
@ -1112,11 +1112,11 @@ func buildInstallPkgbuilds(dp *depPool, do *depOrder, srcinfos map[string]*gosrc
|
|||
doAddTarget := func(name string, optional bool) error {
|
||||
pkgdest, ok := pkgdests[name]
|
||||
if !ok {
|
||||
if !optional {
|
||||
return fmt.Errorf("Could not find PKGDEST for: %s", name)
|
||||
if optional {
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
return fmt.Errorf("Could not find PKGDEST for: %s", name)
|
||||
}
|
||||
|
||||
arguments.addTarget(pkgdest)
|
||||
|
|
Loading…
Reference in a new issue