add error message to failing commands *facepalm*

This commit is contained in:
Shane C 2024-09-19 10:57:27 -04:00
parent 88c55d3d73
commit 0466a423ec
Signed by: shane
GPG key ID: E46B5FEA35B22FF9

View file

@ -192,7 +192,7 @@ func (cmd *LinuxCommand) Run() error {
}
exitInfo.HasSucceeded = false
exitInfo.ExitCode = exitErr.ExitCode()
exitInfo.Error = exitErr.Error()
exitInfo.Error = exitErr.String()
err := h.(func(data EventExitData) error)(*exitInfo)
if err != nil {
return fmt.Errorf("%s: %w", ErrRunningEvt.Error(), err)
@ -206,7 +206,7 @@ func (cmd *LinuxCommand) Run() error {
}
exitInfo.HasSucceeded = false
exitInfo.ExitCode = exitErr.ExitCode()
exitInfo.Error = exitErr.Error()
exitInfo.Error = exitErr.String()
err := h.(func(data EventExitData) error)(*exitInfo)
if err != nil {
return fmt.Errorf("%s: %w", ErrRunningEvt.Error(), err)