5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 21:53:11 +08:00

Fix module path for non-modified repo

This commit is contained in:
Lea Anthony 2023-04-19 08:22:58 +10:00
parent 54bf8c1142
commit 62b3775e2f
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -1,12 +1,12 @@
package debug package debug
import ( import (
"github.com/samber/lo"
"path/filepath" "path/filepath"
"runtime" "runtime"
) "runtime/debug"
import "runtime/debug" "github.com/samber/lo"
)
// Why go doesn't provide this as a map already is beyond me. // Why go doesn't provide this as a map already is beyond me.
var buildSettings = map[string]string{} var buildSettings = map[string]string{}
@ -20,7 +20,7 @@ func init() {
buildSettings = lo.Associate(buildInfo.Settings, func(setting debug.BuildSetting) (string, string) { buildSettings = lo.Associate(buildInfo.Settings, func(setting debug.BuildSetting) (string, string) {
return setting.Key, setting.Value return setting.Key, setting.Value
}) })
if isLocalBuild() { if isLocalBuild() || buildInfo.Path == "" {
modulePath := RelativePath("..", "..", "..") modulePath := RelativePath("..", "..", "..")
LocalModulePath, _ = filepath.Abs(modulePath) LocalModulePath, _ = filepath.Abs(modulePath)
} }