mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-07 18:49:08 -06:00
/go/libraries/doltcore/env/config.go: fix no config panic
This commit is contained in:
5
go/libraries/doltcore/env/config.go
vendored
5
go/libraries/doltcore/env/config.go
vendored
@@ -171,12 +171,13 @@ func (dcc *DoltCliConfig) IfEmptyUseConfig(val, key string) string {
|
||||
}
|
||||
|
||||
func GetStringOrDefault(cfg config.ReadableConfig, key, defStr string) string {
|
||||
if cfg == nil {
|
||||
return defStr
|
||||
}
|
||||
val, err := cfg.GetString(key)
|
||||
|
||||
if err != nil {
|
||||
return defStr
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user