We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c03f734 + 8c09d70 commit b668567Copy full SHA for b668567
pkg/usrlocalsharelima/usrlocalsharelima.go
@@ -57,8 +57,16 @@ func Dir() (string, error) {
57
selfViaOS, err := os.Executable()
58
if err != nil {
59
logrus.WithError(err).Warn("failed to find os.Executable()")
60
- } else if len(selfPaths) == 0 || selfViaOS != selfPaths[0] {
61
- selfPaths = append(selfPaths, selfViaOS)
+ } else {
+ selfFinalPathViaOS, err := filepath.EvalSymlinks(selfViaOS)
62
+ if err != nil {
63
+ logrus.WithError(err).Warn("failed to resolve symlinks")
64
+ selfFinalPathViaOS = selfViaOS // fallback to the original path
65
+ }
66
+
67
+ if len(selfPaths) == 0 || selfFinalPathViaOS != selfPaths[0] {
68
+ selfPaths = append(selfPaths, selfFinalPathViaOS)
69
70
}
71
72
ostype := limayaml.NewOS("linux")
0 commit comments