aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 9f2f0933d4..47e0ae2cda 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -466,6 +466,13 @@ func getAppPath() (string, error) {
}
if err != nil {
+ // FIXME: Once we switch to go 1.19 use !errors.Is(err, exec.ErrDot)
+ if !strings.Contains(err.Error(), "cannot run executable found relative to current directory") {
+ return "", err
+ }
+ appPath, err = filepath.Abs(os.Args[0])
+ }
+ if err != nil {
return "", err
}
appPath, err = filepath.Abs(appPath)