From a3d3ab2058bceb4041087beab0178f1e0ea940b1 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Wed, 30 Nov 2022 22:47:53 -0300 Subject: [PATCH] fix: improve docker warning --- internal/pipe/docker/docker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go index 7c1e3b825..8500cd522 100644 --- a/internal/pipe/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -129,9 +129,6 @@ func (Pipe) Run(ctx *context.Context) error { } artifacts := ctx.Artifacts.Filter(artifact.And(filters...)) log.WithField("artifacts", artifacts.Paths()).Debug("found artifacts") - if len(artifacts.Paths()) == 0 { - log.Warn("not binaries or packages found for the given platform - COPY/ADD may not work") - } return process(ctx, docker, artifacts.List()) }) } @@ -145,6 +142,9 @@ func (Pipe) Run(ctx *context.Context) error { } func process(ctx *context.Context, docker config.Docker, artifacts []*artifact.Artifact) error { + if len(artifacts) == 0 { + log.Warn("not binaries or packages found for the given platform - COPY/ADD may not work") + } tmp, err := os.MkdirTemp(ctx.Config.Dist, "goreleaserdocker") if err != nil { return fmt.Errorf("failed to create temporary dir: %w", err)