mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-30 16:12:39 -06:00
Allow calling GetBool on nil DoltCliConfig. (This should only matter for tests)
This commit is contained in:
3
go/libraries/doltcore/env/config.go
vendored
3
go/libraries/doltcore/env/config.go
vendored
@@ -178,6 +178,9 @@ func (dcc *DoltCliConfig) GetStringOrDefault(key, defStr string) string {
|
||||
}
|
||||
|
||||
func (dcc *DoltCliConfig) GetBool(key string, defaultValue bool) (bool, error) {
|
||||
if dcc == nil {
|
||||
return defaultValue, nil
|
||||
}
|
||||
configString, err := dcc.GetString(config.MmapArchiveIndexes)
|
||||
if err == config.ErrConfigParamNotFound {
|
||||
return defaultValue, nil
|
||||
|
||||
Reference in New Issue
Block a user