diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-05-03 08:01:25 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-05-03 08:01:25 -0600 |
commit | ab6f0b9641ad6e9cef72f73d23e31138a97a225b (patch) | |
tree | c9c8a4e44a0657f6fb186e2401799846847673f5 /src/nix | |
parent | 4b99c09f5ccd385d2bf0c82a8c9a4ae1658abbe8 (diff) |
convert some printError calls to logError
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/upgrade-nix.cc | 8 | ||||
-rw-r--r-- | src/nix/verify.cc | 20 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/nix/upgrade-nix.cc b/src/nix/upgrade-nix.cc index c05c29517..8f4e529bc 100644 --- a/src/nix/upgrade-nix.cc +++ b/src/nix/upgrade-nix.cc @@ -64,7 +64,13 @@ struct CmdUpgradeNix : MixDryRun, StoreCommand if (dryRun) { stopProgressBar(); - printError("would upgrade to version %s", version); + // TODO change to info? + logWarning( + ErrorInfo { + .name = "Version update", + .hint = hintfmt("would upgrade to version %s", version) + }); + // printError("would upgrade to version %s", version); return; } 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)) + }); + } } |