This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch fix#5659
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/fix#5659 by this push:
new c0749a625 fix: ci lint
c0749a625 is described below
commit c0749a625040ca69a05d296ffbf682611c6b0b45
Author: abeizn <[email protected]>
AuthorDate: Tue Sep 26 15:44:29 2023 +0800
fix: ci lint
---
backend/core/runner/db.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/core/runner/db.go b/backend/core/runner/db.go
index 73a4e7875..92eb67072 100644
--- a/backend/core/runner/db.go
+++ b/backend/core/runner/db.go
@@ -137,8 +137,10 @@ func getDbConnection(dbUrl string, conf *gorm.Config)
(*gorm.DB, error) {
if ok := rootCertPool.AppendCertsFromPEM(pem); !ok {
return nil, err
}
- tlsMysql.RegisterTLSConfig("custom",
&tls.Config{RootCAs: rootCertPool})
-
+ err = tlsMysql.RegisterTLSConfig("custom",
&tls.Config{RootCAs: rootCertPool})
+ if err != nil {
+ return nil, err
+ }
dbUrl = fmt.Sprintf("%s&tls=custom", dbUrl)
db, err := sql.Open("mysql", dbUrl)
if err != nil {