1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

WIP: Make Hash always store a valid hash type

This commit is contained in:
John Ericson 2020-06-19 18:41:33 +00:00
parent 984e521392
commit 20799a5151
8 changed files with 53 additions and 52 deletions

View file

@ -153,7 +153,7 @@ static int _main(int argc, char * * argv)
/* If an expected hash is given, the file may already exist in
the store. */
Hash hash, expectedHash(ht);
Hash hash(ht), expectedHash(ht);
std::optional<StorePath> storePath;
if (args.size() == 2) {
expectedHash = Hash(args[1], ht);