1
0
mirror of https://github.com/go-task/task.git synced 2025-07-15 01:35:00 +02:00

chore: move away from deprecated func

This commit is contained in:
Andrey Nering
2025-07-07 10:09:19 -03:00
parent a10a9faabf
commit 8a43ca5d8f
2 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,7 @@
package errors
import (
"errors"
"fmt"
"strings"
@ -46,8 +47,9 @@ func (err *TaskRunError) Code() int {
}
func (err *TaskRunError) TaskExitCode() int {
if c, ok := interp.IsExitStatus(err.Err); ok {
return int(c)
var exit interp.ExitStatus
if errors.As(err.Err, &exit) {
return int(exit)
}
return err.Code()
}