Merge pull request #163 from tomberek/check_outputs
fix: catch errors for invalid derivations
This commit is contained in:
commit
4b9af9b778
|
@ -184,9 +184,14 @@ struct Drv {
|
||||||
|
|
||||||
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
|
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
|
||||||
|
|
||||||
|
try {
|
||||||
for (auto out : drvInfo.queryOutputs(true)) {
|
for (auto out : drvInfo.queryOutputs(true)) {
|
||||||
if (out.second)
|
if (out.second)
|
||||||
outputs[out.first] = localStore->printStorePath(*out.second);
|
outputs[out.first] =
|
||||||
|
localStore->printStorePath(*out.second);
|
||||||
|
}
|
||||||
|
} catch (const std::exception &e) {
|
||||||
|
throw EvalError("derivation must have valid outputs: %s", e.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myArgs.meta) {
|
if (myArgs.meta) {
|
||||||
|
|
Loading…
Reference in a new issue