mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
fix: adapt event-log error to the two-value remedy signature
Belongs with the previous commit; it was left unstaged and e0580b1
does not compile without it.
This commit is contained in:
@@ -226,10 +226,11 @@ func main() {
|
|||||||
// under sudo).
|
// under sudo).
|
||||||
func eventlogInitError(err error) error {
|
func eventlogInitError(err error) error {
|
||||||
if errors.Is(err, fs.ErrPermission) {
|
if errors.Is(err, fs.ErrPermission) {
|
||||||
|
help, _ := config.UnwritableConfigDirRemedy(config.Get().ConfigDir())
|
||||||
return usefulerror.NewUsefulError().
|
return usefulerror.NewUsefulError().
|
||||||
WithCode(errcodes.PermissionDenied).
|
WithCode(errcodes.PermissionDenied).
|
||||||
WithHumanError("event logging is required but its directory is not writable").
|
WithHumanError("event logging is required but its directory is not writable").
|
||||||
WithHelp(config.UnwritableConfigDirRemedy(config.Get().ConfigDir())).
|
WithHelp(help).
|
||||||
Wrap(err)
|
Wrap(err)
|
||||||
}
|
}
|
||||||
return usefulerror.NewUsefulError().
|
return usefulerror.NewUsefulError().
|
||||||
|
|||||||
Reference in New Issue
Block a user