to-base supports parsing SRI hashes, so make type flag optional
This commit is contained in:
parent
d73dbc8e4c
commit
c502119fd3
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue