mirror of
https://github.com/docker/compose.git
synced 2025-09-22 09:17:42 +02:00
check the assume yes publish flag command before the presence of bind mounts
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
60681a824c
commit
c420bc44c4
@ -236,6 +236,9 @@ func (s *composeService) preChecks(project *types.Project, options api.PublishOp
|
||||
if ok, err := s.checkOnlyBuildSection(project); !ok || err != nil {
|
||||
return false, err
|
||||
}
|
||||
if options.AssumeYes {
|
||||
return true, nil
|
||||
}
|
||||
bindMounts := s.checkForBindMount(project)
|
||||
if len(bindMounts) > 0 {
|
||||
fmt.Println("you are about to publish bind mounts declaration within your OCI artifact.\n" +
|
||||
@ -251,9 +254,6 @@ func (s *composeService) preChecks(project *types.Project, options api.PublishOp
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
if options.AssumeYes {
|
||||
return true, nil
|
||||
}
|
||||
detectedSecrets, err := s.checkForSensitiveData(project)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user