MCPcopy Create free account
hub / github.com/devspace-sh/devspace / HandleError

Function HandleError

pkg/devspace/pipeline/engine/basichandler/handler.go:148–161  ·  view source on GitHub ↗
(ctx context.Context, command string, err error)

Source from the content-addressed store, hash-verified

146}
147
148func HandleError(ctx context.Context, command string, err error) error {
149 if err == nil {
150 return interp.NewExitStatus(0)
151 }
152
153 _, ok := interp.IsExitStatus(err)
154 if ok {
155 return err
156 }
157
158 hc := interp.HandlerCtx(ctx)
159 _, _ = fmt.Fprintln(hc.Stderr, errors.Wrap(err, command))
160 return interp.NewExitStatus(1)
161}
162
163var lookPathDir = interp.LookPathDir

Callers 2

handler.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected