mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 15:48:07 -06:00
[bug] Fix sqlite empty address issue (#370)
* error when empty address has been set for sqlite * better explain sqlite db-address setting
This commit is contained in:
parent
66175c8ad9
commit
959e38ac5c
4 changed files with 79 additions and 3 deletions
|
|
@ -204,7 +204,11 @@ func NewBunDBService(ctx context.Context) (db.DB, error) {
|
|||
}
|
||||
|
||||
func sqliteConn(ctx context.Context) (*DBConn, error) {
|
||||
// validate db address has actually been set
|
||||
dbAddress := viper.GetString(config.Keys.DbAddress)
|
||||
if dbAddress == "" {
|
||||
return nil, fmt.Errorf("'%s' was not set when attempting to start sqlite", config.Keys.DbAddress)
|
||||
}
|
||||
|
||||
// Drop anything fancy from DB address
|
||||
dbAddress = strings.Split(dbAddress, "?")[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue