(ctx context.Context, apiClient client.ExecAPIClient, execID string)
| 202 | } |
| 203 | |
| 204 | func getExecExitStatus(ctx context.Context, apiClient client.ExecAPIClient, execID string) error { |
| 205 | resp, err := apiClient.ExecInspect(ctx, execID, client.ExecInspectOptions{}) |
| 206 | if err != nil { |
| 207 | // If we can't connect, then the daemon probably died. |
| 208 | if !client.IsErrConnectionFailed(err) { |
| 209 | return err |
| 210 | } |
| 211 | return cli.StatusError{StatusCode: -1} |
| 212 | } |
| 213 | status := resp.ExitCode |
| 214 | if status != 0 { |
| 215 | return cli.StatusError{StatusCode: status} |
| 216 | } |
| 217 | return nil |
| 218 | } |
| 219 | |
| 220 | // parseExec parses the specified args for the specified command and generates |
| 221 | // an ExecConfig from it. |
searching dependent graphs…