mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
* Turn build errors during evaluation into EvalErrors.
This commit is contained in:
parent
8bcdd36f10
commit
89865da76d
4 changed files with 7 additions and 4 deletions
|
@ -37,7 +37,11 @@ static void prim_import(EvalState & state, Value * * args, Value & v)
|
|||
throw EvalError(format("cannot import `%1%', since path `%2%' is not valid")
|
||||
% path % *i);
|
||||
if (isDerivation(*i))
|
||||
store->buildDerivations(singleton<PathSet>(*i));
|
||||
try {
|
||||
store->buildDerivations(singleton<PathSet>(*i));
|
||||
} catch (Error & e) {
|
||||
throw ImportError(e.msg());
|
||||
}
|
||||
}
|
||||
|
||||
state.evalFile(path, v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue