MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / ExitCodeFromWaitErr

Function ExitCodeFromWaitErr

pkg/shellexec/shellexec.go:97–108  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

95}
96
97func ExitCodeFromWaitErr(err error) int {
98 if err == nil {
99 return 0
100 }
101 if exitErr, ok := err.(*exec.ExitError); ok {
102 if status, ok := exitErr.Sys().(syscall.WaitStatus); ok {
103 return status.ExitStatus()
104 }
105 }
106 return -1
107
108}
109
110func checkCwd(cwd string) error {
111 if cwd == "" {

Callers 1

ExitCodeMethod · 0.85

Calls 1

SysMethod · 0.80

Tested by

no test coverage detected