Skip to content

Commit f92daf8

Browse files
jrohelppisar
authored andcommitted
config: Support optionTListAppend for options lacking fromString
Now `optionTListAppend` processes `OptionChild`. Since `OptionChild` does not implement `fromString`, a temporary `OptionStringList` instance is created and used to parse the input value string instead.
1 parent 8eadf44 commit f92daf8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libdnf/conf/Config-private.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#define _LIBDNF_CONFIG_PRIVATE_HPP
2323

2424
#include "Option.hpp"
25+
#include "OptionStringList.hpp"
2526

2627
namespace libdnf {
2728

@@ -33,7 +34,7 @@ static void optionTListAppend(T & option, Option::Priority priority, const std::
3334
return;
3435
}
3536
auto addPriority = priority < option.getPriority() ? option.getPriority() : priority;
36-
auto val = option.fromString(value);
37+
auto val = OptionStringList(std::vector<std::string>{}).fromString(value);
3738
bool first = true;
3839
for (auto & item : val) {
3940
if (item.empty()) {

0 commit comments

Comments
 (0)