From 62b3775e2f88e875f08254f26c24ddfdaef48e9f Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Wed, 19 Apr 2023 08:22:58 +1000 Subject: [PATCH] Fix module path for non-modified repo --- v3/internal/debug/debug.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v3/internal/debug/debug.go b/v3/internal/debug/debug.go index 47db8b626..be3480a23 100644 --- a/v3/internal/debug/debug.go +++ b/v3/internal/debug/debug.go @@ -1,12 +1,12 @@ package debug import ( - "github.com/samber/lo" "path/filepath" "runtime" -) + "runtime/debug" -import "runtime/debug" + "github.com/samber/lo" +) // Why go doesn't provide this as a map already is beyond me. var buildSettings = map[string]string{} @@ -20,7 +20,7 @@ func init() { buildSettings = lo.Associate(buildInfo.Settings, func(setting debug.BuildSetting) (string, string) { return setting.Key, setting.Value }) - if isLocalBuild() { + if isLocalBuild() || buildInfo.Path == "" { modulePath := RelativePath("..", "..", "..") LocalModulePath, _ = filepath.Abs(modulePath) }