From ee8b8e988c47a400d035891539a045031854b391 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 11 Oct 2023 12:20:19 -0400 Subject: [PATCH] cmd/go: clean up "cover" debug output Currently, the two places that run the cover tool manually construct a terse command description. However, this actually prevents Builder.run from constructing a more detailed description from the actual command being run. Fix this by passing "" as the description to get the default behavior. Change-Id: I27d42cb1fda9bba70c631dc43417a03b8bddec92 Reviewed-on: https://go-review.googlesource.com/c/go/+/534157 LUCI-TryBot-Result: Go LUCI Auto-Submit: Austin Clements Reviewed-by: Than McIntosh --- src/cmd/go/internal/work/exec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 0a9e109c50..42ecac6d03 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -2036,7 +2036,7 @@ func (b *Builder) installHeader(ctx context.Context, a *Action) error { // // go tool cover -mode=b.coverMode -var="varName" -o dst.go src.go func (b *Builder) cover(a *Action, dst, src string, varName string) error { - return b.run(a, a.Objdir, "cover "+a.Package.ImportPath, nil, + return b.run(a, a.Objdir, "", nil, cfg.BuildToolexec, base.Tool("cover"), "-mode", a.Package.Internal.Cover.Mode, @@ -2069,7 +2069,7 @@ func (b *Builder) cover2(a *Action, infiles, outfiles []string, varName string, "-outfilelist", covoutputs, } args = append(args, infiles...) - if err := b.run(a, a.Objdir, "cover "+a.Package.ImportPath, nil, + if err := b.run(a, a.Objdir, "", nil, cfg.BuildToolexec, args); err != nil { return nil, err } -- 2.50.0