aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-11 14:06:35 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-11 14:06:35 -0600
commitef1b3f21b6e51007d82e8e894dd9ecec0d1c5207 (patch)
tree28ec34c71e98779d0b655a0b8e9070b981ee0cd9 /src/nix-store/nix-store.cc
parent94c347577ecea5dcd10a31ebfadf94db6ca5ab0d (diff)
parentac4d43a31bb32c1205b44d69e87606b7f54922a1 (diff)
Merge remote-tracking branch 'upstream/master' into errors-phase-2
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 5e42736fc..dea53b52f 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -373,7 +373,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
auto info = store->queryPathInfo(j);
if (query == qHash) {
assert(info->narHash.type == htSHA256);
- cout << fmt("%s\n", info->narHash.to_string(Base32));
+ cout << fmt("%s\n", info->narHash.to_string(Base32, true));
} else if (query == qSize)
cout << fmt("%d\n", info->narSize);
}
@@ -734,8 +734,8 @@ static void opVerifyPath(Strings opFlags, Strings opArgs)
.hint = hintfmt(
"path '%s' was modified! expected hash '%s', got '%s'",
store->printStorePath(path),
- info->narHash.to_string(),
- current.first.to_string())
+ info->narHash.to_string(Base32, true),
+ current.first.to_string(Base32, true))
});
status = 1;
}
@@ -864,7 +864,7 @@ static void opServe(Strings opFlags, Strings opArgs)
out << info->narSize // downloadSize
<< info->narSize;
if (GET_PROTOCOL_MINOR(clientVersion) >= 4)
- out << (info->narHash ? info->narHash.to_string() : "") << info->ca << info->sigs;
+ out << (info->narHash ? info->narHash.to_string(Base32, true) : "") << info->ca << info->sigs;
} catch (InvalidPath &) {
}
}
@@ -1106,6 +1106,8 @@ static int _main(int argc, char * * argv)
op(opFlags, opArgs);
+ logger->stop();
+
return 0;
}
}