Fix panic using wrong err object

This commit is contained in:
Jamie Curnow 2023-05-31 11:35:24 +10:00
parent aec0a606af
commit 0461689d65
No known key found for this signature in database
GPG Key ID: FFBB624C43388E9E

View File

@ -33,9 +33,8 @@ func shExec(args []string) (string, error) {
c := exec.Command(ng, args...)
b, e := c.CombinedOutput()
if e != nil {
logger.Error("NginxError", eris.Wrapf(err, "Command error: %s -- %v\n%+v", ng, args, e))
logger.Error("NginxError", eris.Wrapf(e, "Command error: %s -- %v\n%+v", ng, args, e))
logger.Warn(string(b))
}