fix: correctly pass unix socket to xorm
continuous-integration/drone/push Build is passing Details

pull/567/head
kolaente 2023-04-17 19:39:38 +02:00
parent 0a6bbc2efd
commit 7ad256f6cd
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ func initMysqlEngine() (engine *xorm.Engine, err error) {
// See https://stackoverflow.com/a/30074553/10924593 for more info.
host := fmt.Sprintf("tcp(%s)", config.DatabaseHost.GetString())
if config.DatabaseHost.GetString()[0] == '/' { // looks like a unix socket
host = config.DatabaseHost.GetString()
host = fmt.Sprintf("unix(%s)", config.DatabaseHost.GetString())
}
connStr := fmt.Sprintf(