Skip to content

Commit

Permalink
repoquery: allow specifying upper-case tags in --queryformat
Browse files Browse the repository at this point in the history
It unifies behavior with dnf4 and rpm queryformat.

Closes: #861
  • Loading branch information
kontura authored and Conan-Kudo committed Sep 20, 2023
1 parent 42b159e commit e54c233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libdnf5-cli/output/repoqueryformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.


#include "fmt/args.h"
#include "utils/string.hpp"

#include "libdnf5-cli/output/repoquery.hpp"

Expand Down Expand Up @@ -191,7 +192,7 @@ std::pair<std::vector<Getter>, std::string> parse_queryformat(const std::string
state = OUTSIDE;
// To get the name we add/subtract 2 becasue each tag name (after brace expansion) starts with "{{".
auto getter_name = format.substr(tag_name_start + 2, format_size - tag_name_start - 2);
auto getter = NAME_TO_GETTER.find(getter_name);
auto getter = NAME_TO_GETTER.find(libdnf5::utils::string::tolower(getter_name));
if (getter != NAME_TO_GETTER.end()) {
if (replace_tag_in_format(format, format_size, tag_start, tag_name_start)) {
getters.push_back(getter->second);
Expand Down

0 comments on commit e54c233

Please sign in to comment.