Merge branch 'main' into feature/bots

This commit is contained in:
Jason Song
2022-12-19 18:26:28 +08:00
committed by GitHub
27 changed files with 677 additions and 198 deletions

View File

@ -469,6 +469,13 @@ func getAppPath() (string, error) {
appPath, err = exec.LookPath(os.Args[0])
}
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
}