mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Honor etcd legacy v/s new config settings properly (#8510)
This PR also fixes issues related to - Add proper newline for `mc admin config get` output for more than one targets - Fixes issue of temporary user credentials to have consistent output - Fixes a crash when setting a key with empty values - Fixes a parsing issue with `mc admin config history` - Fixes gateway ENV handling for etcd server and gateway
This commit is contained in:
@@ -405,6 +405,9 @@ func (c Config) SetKVS(s string, defaultKVS map[string]KVS) error {
|
||||
kvs[prevK] = strings.Join([]string{kvs[prevK], sanitizeValue(kv[0])}, KvSpaceSeparator)
|
||||
continue
|
||||
}
|
||||
if len(kv) == 1 {
|
||||
return Error(fmt.Sprintf("key '%s', cannot have empty value", kv[0]))
|
||||
}
|
||||
prevK = kv[0]
|
||||
kvs[kv[0]] = sanitizeValue(kv[1])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user