mirror of
https://github.com/NixOS/nix
synced 2025-07-05 12:21:48 +02:00
elide the 'ErrorInfo' in logError and logWarning calls
This commit is contained in:
parent
734283d636
commit
d82d230b40
11 changed files with 187 additions and 224 deletions
|
@ -704,7 +704,7 @@ static void opVerify(Strings opFlags, Strings opArgs)
|
|||
else throw UsageError("unknown flag '%1%'", i);
|
||||
|
||||
if (store->verifyStore(checkContents, repair)) {
|
||||
logWarning(ErrorInfo {
|
||||
logWarning({
|
||||
.name = "Store consistency",
|
||||
.description = "not all errors were fixed"
|
||||
});
|
||||
|
@ -729,14 +729,13 @@ static void opVerifyPath(Strings opFlags, Strings opArgs)
|
|||
store->narFromPath(path, sink);
|
||||
auto current = sink.finish();
|
||||
if (current.first != info->narHash) {
|
||||
logError(
|
||||
ErrorInfo {
|
||||
.name = "Hash mismatch",
|
||||
.hint = hintfmt(
|
||||
"path '%s' was modified! expected hash '%s', got '%s'",
|
||||
store->printStorePath(path),
|
||||
info->narHash.to_string(),
|
||||
current.first.to_string())
|
||||
logError({
|
||||
.name = "Hash mismatch",
|
||||
.hint = hintfmt(
|
||||
"path '%s' was modified! expected hash '%s', got '%s'",
|
||||
store->printStorePath(path),
|
||||
info->narHash.to_string(),
|
||||
current.first.to_string())
|
||||
});
|
||||
status = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue