don't crash if there's no drvPath

This commit is contained in:
Ben Burdette 2020-08-05 11:26:06 -06:00
parent e4eae078a5
commit 31f1af0cab

View file

@ -181,9 +181,15 @@ static int _main(int argc, char * * argv)
}
// add the template values.
string drvstr;
if (drvPath.has_value())
drvstr = drvPath->to_string();
else
drvstr = "<unknown>";
auto hint = hintformat(hintstring);
hint
% drvPath->to_string()
% drvstr
% neededSystem
% concatStringsSep<StringSet>(", ", requiredFeatures)
% machines.size();