minor code cleanup

This commit is contained in:
2023-05-21 19:49:34 +02:00
parent e079526d4c
commit 2a7aef16a6
5 changed files with 9 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ type ProtoPackage struct {
}
var (
NotEligibleError = errors.New("package is not eligible")
ErrorNotEligible = errors.New("package is not eligible")
)
func (p *ProtoPackage) isEligible(ctx context.Context) (bool, error) {
@@ -162,7 +162,7 @@ func (p *ProtoPackage) build(ctx context.Context) (time.Duration, error) {
}
if !elig {
return time.Since(start), NotEligibleError
return time.Since(start), ErrorNotEligible
}
log.Infof("[P] build starting: %s->%s->%s", p.FullRepo, p.Pkgbase, p.Version)
@@ -443,7 +443,7 @@ func (p *ProtoPackage) isAvailable(h *alpm.Handle) bool {
} else if len(p.DBPackage.Packages) > 0 {
pkg, err = dbs.FindSatisfier(p.DBPackage.Packages[0])
} else {
cmd := exec.Command("unbuffer", "pacsift", "--exact", "--base="+p.Pkgbase, "--repo="+p.Repo.String()) //nolint:gosec
cmd := exec.Command("unbuffer", "pacsift", "--exact", "--base="+p.Pkgbase, "--repo="+p.Repo.String())
var res []byte
res, err = cmd.CombinedOutput()
log.Debug(string(res))