Skip to content

Commit c420bc4

Browse files
gloursndeloof
authored andcommitted
check the assume yes publish flag command before the presence of bind mounts
Signed-off-by: Guillaume Lours <[email protected]>
1 parent 60681a8 commit c420bc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/compose/publish.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ func (s *composeService) preChecks(project *types.Project, options api.PublishOp
236236
if ok, err := s.checkOnlyBuildSection(project); !ok || err != nil {
237237
return false, err
238238
}
239+
if options.AssumeYes {
240+
return true, nil
241+
}
239242
bindMounts := s.checkForBindMount(project)
240243
if len(bindMounts) > 0 {
241244
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
251254
return false, err
252255
}
253256
}
254-
if options.AssumeYes {
255-
return true, nil
256-
}
257257
detectedSecrets, err := s.checkForSensitiveData(project)
258258
if err != nil {
259259
return false, err

0 commit comments

Comments
 (0)