From a7d8ee98da37ffc6d4178fcbe60802d7d87e0dd4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 22 Feb 2021 15:10:24 +0100 Subject: [PATCH] Fix build --- src/hydra-eval-jobs/hydra-eval-jobs.cc | 9 --------- src/hydra-queue-runner/hydra-queue-runner.cc | 6 ++++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc index e6f9a4d4..1cea8390 100644 --- a/src/hydra-eval-jobs/hydra-eval-jobs.cc +++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc @@ -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", diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index f50c00e5..3b9ae480 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -97,7 +97,7 @@ void State::parseMachines(const std::string & contents) machine->systemTypes = tokenizeString(tokens[1], ","); machine->sshKey = tokens[2] == "-" ? string("") : tokens[2]; if (tokens[3] != "") - string2Int(tokens[3], machine->maxJobs); + machine->maxJobs = string2IntmaxJobs)>(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(getArg(*arg, arg, end), buildOne)) + if (auto b = string2Int(getArg(*arg, arg, end))) + buildOne = *b; + else throw Error("‘--build-one’ requires a build ID"); } else return false;