diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 18:05:26 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 18:05:26 +0000 |
commit | c502119fd3b9673e966d5c34ec42cbe18baa17b9 (patch) | |
tree | b9317ad19633c02a4bdbbe643383ec5d6623431c /src/nix | |
parent | d73dbc8e4cfe7ad92f072f9ccc30e51df9a5e97b (diff) |
to-base supports parsing SRI hashes, so make type flag optional
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/hash.cc | 4 |
1 files 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<CmdHash>(FileIngest struct CmdToBase : Command { Base base; - HashType ht; + std::optional<HashType> ht; std::vector<std::string> args; CmdToBase(Base base) : base(base) { - addFlag(Flag::mkHashTypeFlag("type", &ht)); + addFlag(Flag::mkHashTypeFlag("type", &*ht)); expectArgs("strings", &args); } |