Skip to content

Commit

Permalink
fix: improve docker warning
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Dec 1, 2022
1 parent a2308ee commit a3d3ab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/pipe/docker/docker.go
Expand Up @@ -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())
})
}
Expand All @@ -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)
Expand Down

0 comments on commit a3d3ab2

Please sign in to comment.