forked from lix-project/nix-eval-jobs
print error if worker receives invalid command
This commit is contained in:
parent
93972c0c18
commit
00d3f014e7
|
@ -366,10 +366,14 @@ static void worker(ref<EvalState> state, Bindings &autoArgs, AutoCloseFD &to,
|
|||
}
|
||||
|
||||
auto s = fromReader.readLine();
|
||||
if (s == "exit")
|
||||
if (s == "exit") {
|
||||
break;
|
||||
if (!hasPrefix(s, "do "))
|
||||
}
|
||||
if (!hasPrefix(s, "do ")) {
|
||||
fprintf(stderr, "worker error: received invalid command '%s'\n",
|
||||
s.data());
|
||||
abort();
|
||||
}
|
||||
auto path = json::parse(s.substr(3));
|
||||
auto attrPathS = attrPathJoin(path);
|
||||
|
||||
|
|
Loading…
Reference in a new issue