f9013e2b7a
As there is currently a bug with go build info a patch is needed to fix printing the correct version number of the binary. Once the bug is fixed, the patch can be dropped. Fixes #22092
17 lines
543 B
Diff
17 lines
543 B
Diff
--- a/caddy.go
|
|
+++ b/caddy.go
|
|
@@ -712,14 +711,0 @@ func goModule(mod *debug.Module) *debug.Module {
|
|
- bi, ok := debug.ReadBuildInfo()
|
|
- if ok {
|
|
- mod.Path = bi.Main.Path
|
|
- // The recommended way to build Caddy involves
|
|
- // creating a separate main module, which
|
|
- // TODO: track related Go issue: https://github.com/golang/go/issues/29228
|
|
- // once that issue is fixed, we should just be able to use bi.Main... hopefully.
|
|
- for _, dep := range bi.Deps {
|
|
- if dep.Path == ImportPath {
|
|
- return dep
|
|
- }
|
|
- }
|
|
- return &bi.Main
|
|
- }
|