aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-10 11:48:38 +0200
committerGitHub <noreply@github.com>2020-06-10 11:48:38 +0200
commitb9ae1bdd7a1ed8eee25fc37c97d74c1d6771778d (patch)
tree94ff7c2cdb36c9c1180be86030616ef9c49aceab /src/nix-store/nix-store.cc
parentf64cc6d9b18b7594b560b4a26e4268992bf54eee (diff)
parent6ee03b8444e1838b9985a9fd4f0f46947e958b3b (diff)
Merge pull request #3655 from zimbatm/hash-encoding-prepare
libutils/hash: remove default encoding
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 3a3060ad8..9491a0c26 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);
}
@@ -728,7 +728,7 @@ static void opVerifyPath(Strings opFlags, Strings opArgs)
if (current.first != info->narHash) {
printError(
"path '%s' was modified! expected hash '%s', got '%s'",
- store->printStorePath(path), info->narHash.to_string(), current.first.to_string());
+ store->printStorePath(path), info->narHash.to_string(Base32, true), current.first.to_string(Base32, true));
status = 1;
}
}
@@ -856,7 +856,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 &) {
}
}