fix drv.cc invalid output throw

EvalState::error does not return an exception instance in lix, but an
exception *builder*. throwing this thing will not trigger any catches,
which then causes the worker process to die without reporting an error
to the collector. this confuses the collector and causes *it* to exit,
effectively breaking nix-eval-jobs for anything that has broken attrs.
This commit is contained in:
eldritch horrors 2024-04-18 18:05:33 +02:00
parent c3d8ca19b3
commit 793841a9b7

View file

@ -50,8 +50,9 @@ Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo,
outputs[out.first] = localStore->printStorePath(*out.second);
}
} catch (const std::exception &e) {
throw state.error<nix::EvalError>("derivation '%s' does not have valid outputs: %s",
attrPath, e.what());
throw nix::EvalError(state,
"derivation '%s' does not have valid outputs: %s",
attrPath, e.what());
}
if (args.meta) {