Fix missing separator in module info line (usedby and using lists) (#9241)

Fix module info genModulesInfoStringRenderModulesList lack separator when there's more than one module in the list.

Co-authored-by: Oran Agra <oran@redislabs.com>
This commit is contained in:
Huang Zhw 2021-07-19 16:10:25 +08:00 committed by GitHub
parent d54c9086c2
commit 1895e134a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8832,8 +8832,9 @@ sds genModulesInfoStringRenderModulesList(list *l) {
while((ln = listNext(&li))) { while((ln = listNext(&li))) {
RedisModule *module = ln->value; RedisModule *module = ln->value;
output = sdscat(output,module->name); output = sdscat(output,module->name);
if (ln != listLast(l))
output = sdscat(output,"|");
} }
output = sdstrim(output,"|");
output = sdscat(output,"]"); output = sdscat(output,"]");
return output; return output;
} }