1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

convert some printError calls to logError

This commit is contained in:
Ben Burdette 2020-05-03 08:01:25 -06:00
parent 4b99c09f5c
commit ab6f0b9641
19 changed files with 195 additions and 70 deletions

View file

@ -689,8 +689,12 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
request.unpack = true;
res = { true, getDownloader()->downloadCached(store, request).path };
} catch (DownloadError & e) {
// TODO: change to warn()?
printError("warning: Nix search path entry '%1%' cannot be downloaded, ignoring", elem.second);
logWarning(
ErrorInfo {
.name = "Download Error",
.hint = hintfmt("warning: Nix search path entry '%1%' cannot be downloaded, ignoring", elem.second)
});
res = { false, "" };
}
} else {
@ -698,8 +702,11 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
if (pathExists(path))
res = { true, path };
else {
// TODO: change to warn()?
printError("warning: Nix search path entry '%1%' does not exist, ignoring", elem.second);
logWarning(
ErrorInfo {
.name = "Search path not found",
.hint = hintfmt("warning: Nix search path entry '%1%' does not exist, ignoring", elem.second)
});
res = { false, "" };
}
}