minor code cleanup
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user