summaryrefslogtreecommitdiffstats
path: root/modules/doctor
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-05-04 11:55:35 +0800
committerGitHub <noreply@github.com>2023-05-04 11:55:35 +0800
commit377a0a20f01a62f15a1504a3bba6cf6cc0c98bea (patch)
treee86a1818f23be1605a4cd707fadc7dcdce546d18 /modules/doctor
parenta2fe68e50ba819daed9b0e28166a749d18c58750 (diff)
downloadgitea-377a0a20f01a62f15a1504a3bba6cf6cc0c98bea.tar.gz
gitea-377a0a20f01a62f15a1504a3bba6cf6cc0c98bea.zip
Merge setting.InitXXX into one function with options (#24389)
This PR will merge 3 Init functions on setting packages as 1 and introduce an options struct.
Diffstat (limited to 'modules/doctor')
-rw-r--r--modules/doctor/doctor.go3
-rw-r--r--modules/doctor/paths.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/modules/doctor/doctor.go b/modules/doctor/doctor.go
index b23805bc4c..32eb5938c3 100644
--- a/modules/doctor/doctor.go
+++ b/modules/doctor/doctor.go
@@ -44,8 +44,7 @@ func (w *wrappedLevelLogger) Log(skip int, level log.Level, format string, v ...
}
func initDBDisableConsole(ctx context.Context, disableConsole bool) error {
- setting.InitProviderFromExistingFile()
- setting.LoadCommonSettings()
+ setting.Init(&setting.Options{})
setting.LoadDBSetting()
setting.InitSQLLog(disableConsole)
if err := db.InitEngine(ctx); err != nil {
diff --git a/modules/doctor/paths.go b/modules/doctor/paths.go
index 1558efc25b..957152349c 100644
--- a/modules/doctor/paths.go
+++ b/modules/doctor/paths.go
@@ -66,8 +66,7 @@ func checkConfigurationFiles(ctx context.Context, logger log.Logger, autofix boo
return err
}
- setting.InitProviderFromExistingFile()
- setting.LoadCommonSettings()
+ setting.Init(&setting.Options{})
configurationFiles := []configurationFile{
{"Configuration File Path", setting.CustomConf, false, true, false},