mirror of
https://github.com/minio/minio.git
synced 2025-01-24 13:13:16 -05:00
Fix resetting a config with a non default target name (#15448)
mc admin config reset <alias> notify_webhook:something was not working properly. The reason is that GetSubSys() was not calculating the target name properly because it is quitting early when the number of config inputs ('notify_webhook:something' in this case) is equal to 1. This commit will make the code calculates always calculate the target name if found.
This commit is contained in:
parent
3856d078d2
commit
10b49eb4fb
@ -836,10 +836,6 @@ func GetSubSys(s string) (subSys string, inputs []string, tgt string, e error) {
|
||||
return subSys, inputs, tgt, Errorf("unknown sub-system %s", s)
|
||||
}
|
||||
|
||||
if len(inputs) == 1 {
|
||||
return subSys, inputs, tgt, nil
|
||||
}
|
||||
|
||||
if SubSystemsSingleTargets.Contains(subSystemValue[0]) && len(subSystemValue) == 2 {
|
||||
return subSys, inputs, tgt, Errorf("sub-system '%s' only supports single target", subSystemValue[0])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user