MCPcopy
hub / github.com/smallstep/cli / getExitStatus

Function getExitStatus

exec/exec.go:179–188  ·  view source on GitHub ↗
(cmd *exec.Cmd)

Source from the content-addressed store, hash-verified

177}
178
179func getExitStatus(cmd *exec.Cmd) int {
180 if cmd.ProcessState != nil {
181 //nolint:gocritic // ignore single conditional in switch warning
182 switch sys := cmd.ProcessState.Sys().(type) {
183 case syscall.WaitStatus:
184 return sys.ExitStatus()
185 }
186 }
187 return 1
188}
189
190func errorf(name string, err error) {
191 fmt.Fprintf(os.Stderr, "%s: %s\n", path.Base(name), err.Error())

Callers 2

RunFunction · 0.85
RunWithPidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…