chore: modernize errors.As to errors.AsType
commit302f4ecf357152659b645a823613eff61dfb29cc
authorChristian Rocha <christian@rocha.is>
dateSat 9 May 2026, 21:34 (5 months ago)
parent32410e2
internal/shell/shell.go+1−2
@@ -300,8 +300,7 @@ func ExitCode(err error) int {
300300 if err == nil {
301301 return 0
302302 }
303− var exitErr interp.ExitStatus
304− if errors.As(err, &exitErr) {
303+ if exitErr, ok := errors.AsType[interp.ExitStatus](err); ok {
305304 return int(exitErr)
306305 }
307306 return 1