install.go: swap if branches for readability

This commit is contained in:
Ferdinand Bachmann 2020-02-18 15:22:07 +01:00 committed by J Guerreiro
parent 873b2db591
commit 4f35c2c4fe

View file

@ -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)