Fix build

This commit is contained in:
Eelco Dolstra 2021-02-22 15:10:24 +01:00
parent 34b438ab6e
commit a7d8ee98da
2 changed files with 4 additions and 11 deletions

View file

@ -37,15 +37,6 @@ struct MyArgs : MixEvalArgs, MixCommonArgs
MyArgs() : MixCommonArgs("hydra-eval-jobs")
{
addFlag({
.longName = "help",
.description = "show usage information",
.handler = {[&]() {
printHelp(programName, std::cout);
throw Exit();
}}
});
addFlag({
.longName = "gc-roots-dir",
.description = "garbage collector roots directory",

View file

@ -97,7 +97,7 @@ void State::parseMachines(const std::string & contents)
machine->systemTypes = tokenizeString<StringSet>(tokens[1], ",");
machine->sshKey = tokens[2] == "-" ? string("") : tokens[2];
if (tokens[3] != "")
string2Int(tokens[3], machine->maxJobs);
machine->maxJobs = string2Int<decltype(machine->maxJobs)>(tokens[3]).value();
else
machine->maxJobs = 1;
machine->speedFactor = atof(tokens[4].c_str());
@ -862,7 +862,9 @@ int main(int argc, char * * argv)
else if (*arg == "--status")
status = true;
else if (*arg == "--build-one") {
if (!string2Int<BuildID>(getArg(*arg, arg, end), buildOne))
if (auto b = string2Int<BuildID>(getArg(*arg, arg, end)))
buildOne = *b;
else
throw Error("--build-one requires a build ID");
} else
return false;