Skip to content

Commit

Permalink
fix: build log print relative path instead of abs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
caarlos0 committed Feb 5, 2022
1 parent 8f74c87 commit 9df62d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/pipe/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 9df62d8

Please sign in to comment.