(err error)
| 63 | } |
| 64 | |
| 65 | func 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 | } |