MCPcopy
hub / github.com/docker/compose / confirmOrCancel

Method confirmOrCancel

pkg/compose/publish.go:457–466  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

455// - api.ErrCanceled if the user declined;
456// - nil if the user accepted.
457func (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)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected