1
0
mirror of https://github.com/Jguer/yay.git synced 2025-12-25 11:22:10 +01:00
yay/pkg/query/errors.go
LordBeerus c466b96b94
fix: Correctly return exit status 1 when no packages are found (#2705)
* fix: Correctly return exit status 1 when no packages are found

* add testing for targets not found
2025-12-21 15:54:23 +01:00

28 lines
577 B
Go

package query
import (
"github.com/leonelquinteros/gotext"
)
// ErrAURSearch means that it was not possible to connect to the AUR.
type ErrAURSearch struct {
inner error
}
func (e ErrAURSearch) Error() string {
return gotext.Get("Error during AUR search: %s\n", e.inner.Error())
}
// ErrNoQuery means that query was not executed.
type ErrNoQuery struct{}
func (e ErrNoQuery) Error() string {
return gotext.Get("no query was executed")
}
type ErrTargetNotFound struct{}
func (e ErrTargetNotFound) Error() string {
return gotext.Get("no package found for targets")
}