Skip to content

Commit

Permalink
Always emit the configuration path (#17036)
Browse files Browse the repository at this point in the history
Often when handling problems it is not clear which configuration file Gitea is
using. This PR simply ensures that the configuration file is emitted.

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath authored Sep 14, 2021
1 parent 8af7a21 commit 04b233e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func runConvert(ctx *cli.Context) error {
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)
log.Info("Log path: %s", setting.LogRootPath)
log.Info("Configuration file: %s", setting.CustomConf)
setting.InitDBConfig()

if !setting.Database.UseMySQL {
Expand Down
1 change: 1 addition & 0 deletions cmd/dump_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func runDumpRepository(ctx *cli.Context) error {
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)
log.Info("Log path: %s", setting.LogRootPath)
log.Info("Configuration file: %s", setting.CustomConf)
setting.InitDBConfig()

var (
Expand Down
1 change: 1 addition & 0 deletions cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func runMigrate(ctx *cli.Context) error {
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)
log.Info("Log path: %s", setting.LogRootPath)
log.Info("Configuration file: %s", setting.CustomConf)
setting.InitDBConfig()

if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {
Expand Down
1 change: 1 addition & 0 deletions cmd/migrate_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func runMigrateStorage(ctx *cli.Context) error {
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)
log.Info("Log path: %s", setting.LogRootPath)
log.Info("Configuration file: %s", setting.CustomConf)
setting.InitDBConfig()

if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {
Expand Down
1 change: 1 addition & 0 deletions routers/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func GlobalInit(ctx context.Context) {
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)
log.Info("Log path: %s", setting.LogRootPath)
log.Info("Configuration file: %s", setting.CustomConf)
log.Info("Run Mode: %s", strings.Title(setting.RunMode))

// Setup i18n
Expand Down
1 change: 1 addition & 0 deletions routers/install/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func PreloadSettings(ctx context.Context) bool {
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)
log.Info("Log path: %s", setting.LogRootPath)
log.Info("Configuration file: %s", setting.CustomConf)
log.Info("Preparing to run install page")
translation.InitLocales()
if setting.EnableSQLite3 {
Expand Down

0 comments on commit 04b233e

Please sign in to comment.