Skip to content

Commit

Permalink
make buildutil compatible with 'go work'
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwltr committed Feb 7, 2024
1 parent f2dfc5b commit cbda3ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/buildutil/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ func CollectBuildInformation(ctx context.Context, p BuildParameters) (BuildInfo,
e := NewChainExecutor(ctx)

info.BuildDate = time.Now().Format(time.RFC3339)
info.Go.Module = e.OutputString(p.GoCommand, "list", "-m", "-mod=mod")
info.Go.Dir = e.OutputString(p.GoCommand, "list", "-m", "-mod=mod", "-f", "{{.Dir}}")
info.Go.Module = e.OutputString(p.GoCommand, "list")
info.Go.Dir = e.OutputString(p.GoCommand, "list", "-f", "{{.Dir}}")
info.System.OS = e.OutputString(p.GoCommand, "env", "GOOS")
info.System.Arch = e.OutputString(p.GoCommand, "env", "GOARCH")
info.System.Ext = e.OutputString(p.GoCommand, "env", "GOEXE")
Expand Down

0 comments on commit cbda3ea

Please sign in to comment.