mirror of https://github.com/miniflux/v2.git
Do not show $DATABASE_URL warning when showing application info
This commit is contained in:
parent
1bc8535dbb
commit
35b890aadc
16
cli/cli.go
16
cli/cli.go
|
@ -57,14 +57,6 @@ func Parse() {
|
||||||
logger.EnableDebug()
|
logger.EnableDebug()
|
||||||
}
|
}
|
||||||
|
|
||||||
db, err := database.NewConnectionPool(cfg.DatabaseURL(), cfg.DatabaseMinConns(), cfg.DatabaseMaxConns())
|
|
||||||
if err != nil {
|
|
||||||
logger.Fatal("Unable to connect to the database: %v", err)
|
|
||||||
}
|
|
||||||
defer db.Close()
|
|
||||||
|
|
||||||
store := storage.NewStorage(db)
|
|
||||||
|
|
||||||
if flagInfo {
|
if flagInfo {
|
||||||
info()
|
info()
|
||||||
return
|
return
|
||||||
|
@ -75,11 +67,19 @@ func Parse() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db, err := database.NewConnectionPool(cfg.DatabaseURL(), cfg.DatabaseMinConns(), cfg.DatabaseMaxConns())
|
||||||
|
if err != nil {
|
||||||
|
logger.Fatal("Unable to connect to the database: %v", err)
|
||||||
|
}
|
||||||
|
defer db.Close()
|
||||||
|
|
||||||
if flagMigrate {
|
if flagMigrate {
|
||||||
database.Migrate(db)
|
database.Migrate(db)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
store := storage.NewStorage(db)
|
||||||
|
|
||||||
if flagResetFeedErrors {
|
if flagResetFeedErrors {
|
||||||
store.ResetFeedErrors()
|
store.ResetFeedErrors()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue