From a816ef873d61ca12f99e4ec382de21a1207667a2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 27 Oct 2016 20:14:12 +0200 Subject: [PATCH] Warn against empty machines file --- src/hydra-queue-runner/hydra-queue-runner.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index fe08ab06..c341d7e5 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -133,6 +133,12 @@ void State::parseMachines(const std::string & contents) newMachines[m.first] = machine; } + static bool warned = false; + if (newMachines.empty() && !warned) { + printError("warning: no build machines are defined"); + warned = true; + } + auto machines_(machines.lock()); *machines_ = newMachines;