1
0
mirror of https://github.com/Jguer/yay.git synced 2025-08-07 15:17:12 +02:00
yay/errors.go
Jo 4f1f539217
Ignore last layer fails and keep building (#1841)
* fix: do not instantiate cleaning hooks if there's no AUR pkg

* chore: squash local and sync install

* still update completions in local mode

* allow failures on the last install layer
2022-11-29 12:25:36 +00:00

49 lines
1012 B
Go

package main
import "github.com/leonelquinteros/gotext"
type SetPkgReasonError struct {
exp bool // explicit
}
func (e *SetPkgReasonError) Error() string {
reason := gotext.Get("explicit")
if !e.exp {
reason = gotext.Get("dependency")
}
return gotext.Get("error updating package install reason to %s", reason)
}
type FindPkgDestError struct {
name, pkgDest string
}
func (e *FindPkgDestError) Error() string {
return gotext.Get(
"the PKGDEST for %s is listed by makepkg but does not exist: %s",
e.name, e.pkgDest)
}
type PkgDestNotInListError struct {
name string
}
func (e *PkgDestNotInListError) Error() string {
return gotext.Get("could not find PKGDEST for: %s", e.name)
}
type FailedIgnoredPkgError struct {
pkgErrors map[string]error
}
func (e *FailedIgnoredPkgError) Error() string {
msg := gotext.Get("Failed to install the following packages. Manual intervention is required:")
for pkg, err := range e.pkgErrors {
msg += "\n" + pkg + " - " + err.Error()
}
return msg
}