MCPcopy Index your code
hub / github.com/belak/gitdir / getExitStatusFromError

Function getExitStatusFromError

utils.go:70–81  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

68}
69
70func getExitStatusFromError(err error) int {
71 if err == nil {
72 return 0
73 }
74
75 var exitErr *exec.ExitError
76 if !errors.As(err, &exitErr) {
77 return 1
78 }
79
80 return exitErr.ProcessState.ExitCode()
81}
82
83func sanitize(in string) string {
84 // TODO: this should do more

Callers 2

runCommandFunction · 0.85

Calls

no outgoing calls

Tested by 1