Fix help choices string parsing in options

pull/135/head
Piero Toffanin 2020-12-07 08:51:26 -05:00
rodzic cf102456b9
commit d808bca48f
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -140,8 +140,10 @@ module.exports = {
// is in the list of choices
if (domain.indexOf(value) === -1) domain.unshift(value);
}
const choicesStr = Array.isArray(domain) ? domain.join(", ") : domain;
help = help.replace(/^One of: \%\(choices\)s. /, "");
help = help.replace(/\%\(choices\)s/g, choicesStr);
help = help.replace(/\%\(default\)s/g, value);
odmOptions.push({