confirmOrCancel runs an interactive yes/no prompt and returns: - the prompt's error verbatim, if it failed; - api.ErrCanceled if the user declined; - nil if the user accepted.
(message string)
| 455 | // - api.ErrCanceled if the user declined; |
| 456 | // - nil if the user accepted. |
| 457 | func (s *composeService) confirmOrCancel(message string) error { |
| 458 | confirm, err := s.prompt(message, false) |
| 459 | if err != nil { |
| 460 | return err |
| 461 | } |
| 462 | if !confirm { |
| 463 | return api.ErrCanceled |
| 464 | } |
| 465 | return nil |
| 466 | } |
| 467 | |
| 468 | // collectEnvCheckFindings walks every compose file scheduled for publication |
| 469 | // (top-level files plus any local extends parents discovered along the way) |
no outgoing calls
no test coverage detected