1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-30 04:50:45 +02:00

fix: build log print relative path instead of abs

all other logs print relative paths, only the build logs are printing the abs path.

this makes things more even.

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos A Becker 2022-02-05 17:44:07 -03:00
parent 8f74c871bb
commit 9df62d87ec
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -198,14 +198,15 @@ func buildOptionsForTarget(ctx *context.Context, build config.Build, target stri
if build.NoUniqueDistDir {
dir = ""
}
path, err := filepath.Abs(filepath.Join(ctx.Config.Dist, dir, name))
relpath := filepath.Join(ctx.Config.Dist, dir, name)
path, err := filepath.Abs(relpath)
if err != nil {
return nil, err
}
buildOpts.Path = path
buildOpts.Name = name
log.WithField("binary", buildOpts.Path).Info("building")
log.WithField("binary", relpath).Info("building")
return &buildOpts, nil
}