From c502119fd3b9673e966d5c34ec42cbe18baa17b9 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 2 Jun 2020 18:05:26 +0000 Subject: [PATCH] to-base supports parsing SRI hashes, so make type flag optional --- src/nix/hash.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nix/hash.cc b/src/nix/hash.cc index 4980cd198..0e24bbaed 100644 --- a/src/nix/hash.cc +++ b/src/nix/hash.cc @@ -79,12 +79,12 @@ static RegisterCommand r2("hash-path", [](){ return make_ref(FileIngest struct CmdToBase : Command { Base base; - HashType ht; + std::optional ht; std::vector args; CmdToBase(Base base) : base(base) { - addFlag(Flag::mkHashTypeFlag("type", &ht)); + addFlag(Flag::mkHashTypeFlag("type", &*ht)); expectArgs("strings", &args); }