MCPcopy Create free account
hub / github.com/compozy/agh / cliExitCodeForError

Function cliExitCodeForError

internal/cli/agent_identity.go:65–77  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

63}
64
65func cliExitCodeForError(err error) int {
66 if err == nil {
67 return 0
68 }
69 code := agentidentity.ExitCodeForError(err)
70 if code == agentidentity.ExitUnavailable {
71 if _, ok := diagnosticspkg.ItemFromError(err); ok {
72 return code
73 }
74 return 1
75 }
76 return code
77}

Callers 2

writeExecutionErrorFunction · 0.85

Calls 1

ExitCodeForErrorFunction · 0.92

Tested by 1