Use warn to print a warning

This commit is contained in:
Alex Shabalin 2021-11-19 16:29:55 +01:00
parent 4b28798bfc
commit 86b7962807

View file

@ -298,8 +298,8 @@ std::vector<Match> pickNewestOnly(EvalState & state, std::vector<Match> matches)
matches.clear(); matches.clear();
for (auto & [name, match] : newest) { for (auto & [name, match] : newest) {
if (multiple.find(name) != multiple.end()) if (multiple.find(name) != multiple.end())
printInfo( warn(
"warning: there are multiple derivations named '%1%'; using the first one", "there are multiple derivations named '%1%'; using the first one",
name); name);
matches.push_back(match); matches.push_back(match);
} }