From c420bc44c42107678d7dd98055a022e642e7a43a Mon Sep 17 00:00:00 2001 From: Guillaume Lours <705411+glours@users.noreply.github.com> Date: Wed, 13 Aug 2025 10:07:36 +0200 Subject: [PATCH] check the assume yes publish flag command before the presence of bind mounts Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> --- pkg/compose/publish.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/compose/publish.go b/pkg/compose/publish.go index 23f15253d..3408b6f08 100644 --- a/pkg/compose/publish.go +++ b/pkg/compose/publish.go @@ -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