From 7377195297e66c02e91caab700e7984e4c6a904a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 29 Mar 2009 18:06:00 +0000 Subject: [PATCH] * With `--max-jobs 0', print a nicer error message than "Assertion `!awake.empty()' failed." --- src/libstore/build.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index d80c67358..b448cc6b7 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2550,8 +2550,12 @@ void Worker::run(const Goals & _topGoals) /* Wait for input. */ if (!children.empty() || !waitingForAWhile.empty()) waitForInput(); - else + else { + if (maxBuildJobs == 0) throw Error( + "unable to start any build; either increase `--max-jobs' " + "or enable distributed builds"); assert(!awake.empty()); + } } /* If --keep-going is not set, it's possible that the main goal