about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-03-29T18·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-03-29T18·06+0000
commit7377195297e66c02e91caab700e7984e4c6a904a (patch)
treeb944a9d7a876e091c5924296c2994aad9af061df /src/libstore
parent737423a89c4b5f666fb4daf61775764b66911cf1 (diff)
* With `--max-jobs 0', print a nicer error message than "Assertion
  `!awake.empty()' failed."

Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index d80c67358b86..b448cc6b7fc3 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