Allow calling GetBool on nil DoltCliConfig. (This should only matter for tests)

This commit is contained in:
Nick Tobey
2025-07-25 01:52:53 -07:00
parent a1e911159d
commit cb79e2dc56

View File

@@ -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