aboutsummaryrefslogtreecommitdiff
path: root/src/nix/verify.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-05-03 08:01:25 -0600
committerBen Burdette <bburdette@gmail.com>2020-05-03 08:01:25 -0600
commitab6f0b9641ad6e9cef72f73d23e31138a97a225b (patch)
treec9c8a4e44a0657f6fb186e2401799846847673f5 /src/nix/verify.cc
parent4b99c09f5ccd385d2bf0c82a8c9a4ae1658abbe8 (diff)
convert some printError calls to logError
Diffstat (limited to 'src/nix/verify.cc')
-rw-r--r--src/nix/verify.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nix/verify.cc b/src/nix/verify.cc
index 6e043dc2d..f53217239 100644
--- a/src/nix/verify.cc
+++ b/src/nix/verify.cc
@@ -97,9 +97,15 @@ struct CmdVerify : StorePathsCommand
if (hash.first != info->narHash) {
corrupted++;
act2.result(resCorruptedPath, store->printStorePath(info->path));
- printError(
- "path '%s' was modified! expected hash '%s', got '%s'",
- store->printStorePath(info->path), info->narHash.to_string(), hash.first.to_string());
+ logError(
+ ErrorInfo {
+ .name = "Hash error - path modified",
+ .hint = hintfmt(
+ "path '%s' was modified! expected hash '%s', got '%s'",
+ store->printStorePath(info->path),
+ info->narHash.to_string(),
+ hash.first.to_string())
+ });
}
}
@@ -148,7 +154,13 @@ struct CmdVerify : StorePathsCommand
if (!good) {
untrusted++;
act2.result(resUntrustedPath, store->printStorePath(info->path));
- printError("path '%s' is untrusted", store->printStorePath(info->path));
+ logError(
+ ErrorInfo {
+ .name = "Untrusted path",
+ .hint = hintfmt("path '%s' is untrusted",
+ store->printStorePath(info->path))
+ });
+
}
}